-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.
Description
Version
20.10.0
Platform
Linux Alpine
Subsystem
No response
What steps will reproduce the bug?
This command works in 20.9.0, but not in 20.10.0, specifically when --abort-on-uncaught-exception opt is passed in:
$ NODE_OPTIONS="--abort-on-uncaught-exception" node_modules/.bin/knex migrate:make test
# outputs
Uncaught SyntaxError: Cannot use import statement outside a moduleThe version of knex:
node_modules/.bin/knex --version
Knex CLI version: 2.4.2
Knex Local version: 2.4.2How often does it reproduce? Is there a required condition?
Fails every time!
What is the expected behavior? Why is that the expected behavior?
The migration was created by knex in 20.9.0
What do you see instead?
Now it fails with this output:
Uncaught SyntaxError: Cannot use import statement outside a module
FROM
Module._extensions..js (node:internal/modules/cjs/loader:1407:23)
Module.load (node:internal/modules/cjs/loader:1207:32)
Module._load (node:internal/modules/cjs/loader:1023:12)
Module.require (node:internal/modules/cjs/loader:1235:19)
require (node:internal/modules/helpers:176:18)
Object.<anonymous> (/app/node_modules/.pnpm/debug@4.3.4_supports-color@9.2.2/node_modules/debug/src/node.js:32:24)
Module._compile (node:internal/modules/cjs/loader:1376:14)
Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
Module.load (node:internal/modules/cjs/loader:1207:32)
Module._load (node:internal/modules/cjs/loader:1023:12)
Module.require (node:internal/modules/cjs/loader:1235:19)
require (node:internal/modules/helpers:176:18)
Object.<anonymous> (/app/node_modules/.pnpm/debug@4.3.4_supports-color@9.2.2/node_modules/debug/src/index.js:9:19)
Module._compile (node:internal/modules/cjs/loader:1376:14)
Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
Module.load (node:internal/modules/cjs/loader:1207:32)
Module._load (node:internal/modules/cjs/loader:1023:12)
Module.require (node:internal/modules/cjs/loader:1235:19)
require (node:internal/modules/helpers:176:18)
Object.<anonymous> (/app/node_modules/.pnpm/knex@2.4.2_pg@8.11.0/node_modules/knex/lib/execution/transaction.js:4:15)
Module._compile (node:internal/modules/cjs/loader:1376:14)
Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
Module.load (node:internal/modules/cjs/loader:1207:32)
Module._load (node:internal/modules/cjs/loader:1023:12)
Module.require (node:internal/modules/cjs/loader:1235:19)
require (node:internal/modules/helpers:176:18)
Object.<anonymous> (/app/node_modules/.pnpm/knex@2.4.2_pg@8.11.0/node_modules/knex/lib/client.js:10:21)
Module._compile (node:internal/modules/cjs/loader:1376:14)
Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
Module.load (node:internal/modules/cjs/loader:1207:32)
Module._load (node:internal/modules/cjs/loader:1023:12)
Module.require (node:internal/modules/cjs/loader:1235:19)
require (node:internal/modules/helpers:176:18)
Object.<anonymous> (/app/node_modules/.pnpm/knex@2.4.2_pg@8.11.0/node_modules/knex/lib/knex-builder/Knex.js:1:16)
Module._compile (node:internal/modules/cjs/loader:1376:14)
Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
Module.load (node:internal/modules/cjs/loader:1207:32)
Module._load (node:internal/modules/cjs/loader:1023:12)
Module.require (node:internal/modules/cjs/loader:1235:19)
require (node:internal/modules/helpers:176:18)
Object.<anonymous> (/app/node_modules/.pnpm/knex@2.4.2_pg@8.11.0/node_modules/knex/lib/index.js:1:14)
Module._compile (node:internal/modules/cjs/loader:1376:14)
Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
Module.load (node:internal/modules/cjs/loader:1207:32)
Module._load (node:internal/modules/cjs/loader:1023:12)
Module.require (node:internal/modules/cjs/loader:1235:19)
require (node:internal/modules/helpers:176:18)
Object.<anonymous> (/app/node_modules/.pnpm/knex@2.4.2_pg@8.11.0/node_modules/knex/knex.js:8:14)
Module._compile (node:internal/modules/cjs/loader:1376:14)
Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
Module.load (node:internal/modules/cjs/loader:1207:32)
Module._load (node:internal/modules/cjs/loader:1023:12)
Module.require (node:internal/modules/cjs/loader:1235:19)
require (node:internal/modules/helpers:176:18)
initKnex (/app/node_modules/.pnpm/knex@2.4.2_pg@8.11.0/node_modules/knex/bin/cli.js:83:16)
async Command.<anonymous> (/app/node_modules/.pnpm/knex@2.4.2_pg@8.11.0/node_modules/knex/bin/cli.js:221:26)Trace/breakpoint trap
Additional information
No response
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.