Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERR_UNKNOWN_FILE_EXTENSION is not thrown correctly #27761

Closed
targos opened this issue May 18, 2019 · 1 comment · Fixed by #27763
Closed

ERR_UNKNOWN_FILE_EXTENSION is not thrown correctly #27761

targos opened this issue May 18, 2019 · 1 comment · Fixed by #27763
Labels
esm Issues and PRs related to the ECMAScript Modules implementation.

Comments

@targos
Copy link
Member

targos commented May 18, 2019

Reproduction:

echo "import './test.unknown'" > test.mjs
touch test.unknown
node --experimental-modules test.mjs
$ node --experimental-modules test.mjs
(node:15096) ExperimentalWarning: The ESM module loader is experimental.
internal/modules/cjs/loader.js:815
      internalBinding('task_queue').triggerFatalException(
                                    ^

Error [ERR_INTERNAL_ASSERTION]: Code: ERR_UNKNOWN_FILE_EXTENSION; The provided arguments length (2) does not match the required ones (1).
This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues

    at assert (internal/assert.js:13:11)
    at getMessage (internal/errors.js:284:3)
    at new NodeError (internal/errors.js:177:23)
    at Loader.resolve [as _resolve] (internal/modules/esm/default_resolve.js:101:13)
    at Loader.resolve (internal/modules/esm/loader.js:70:33)
    at Loader.getModuleJob (internal/modules/esm/loader.js:143:40)
    at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:43:40)
    at link (internal/modules/esm/module_job.js:42:36)
@targos targos added the esm Issues and PRs related to the ECMAScript Modules implementation. label May 18, 2019
@devsnek
Copy link
Member

devsnek commented May 18, 2019

cc @Fishrock123

cjihrig added a commit to cjihrig/node that referenced this issue May 20, 2019
ERR_UNKNOWN_FILE_EXTENSION expects a single argument. This
commit fixes the argument count.

PR-URL: nodejs#27763
Fixes: nodejs#27761
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
BridgeAR pushed a commit that referenced this issue May 21, 2019
ERR_UNKNOWN_FILE_EXTENSION expects a single argument. This
commit fixes the argument count.

PR-URL: #27763
Fixes: #27761
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
esm Issues and PRs related to the ECMAScript Modules implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants