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

Module not found when module is named con.js with --experimental-modules #29572

Closed
Ntropish opened this issue Sep 16, 2019 · 1 comment
Closed

Comments

@Ntropish
Copy link

Node 12.10.0
Windows 64-bit

This bug happens when importing from a module named con.js, case insensitive, while using --experimental modules

Or, using this command node --experimental-modules ./script.js
where script.js is this line: import con from './con.js'

Full output:

$ node --experimental-modules ./test.js
(node:10604) ExperimentalWarning: The ESM module loader is experimental.
internal/modules/esm/default_resolve.js:79
  let url = moduleWrapResolve(specifier, parentURL);
            ^

Error: Cannot find module C:\dev\con-test\con.js imported from C:\dev\con-test\test.js
    at Loader.resolve [as _resolve] (internal/modules/esm/default_resolve.js:79:13)
    at Loader.resolve (internal/modules/esm/loader.js:73:33)
    at Loader.getModuleJob (internal/modules/esm/loader.js:152:40)
    at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:43:40)
    at link (internal/modules/esm/module_job.js:42:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}
@Ntropish Ntropish changed the title Module not found when module is named con.js/Con.js with --experimental-modules Module not found when module is named con.js with --experimental-modules Sep 16, 2019
@bzoz
Copy link
Contributor

bzoz commented Mar 16, 2020

Fixed by #29574, but the commit does not have the necessary metadata to autoclose this.

@bzoz bzoz closed this as completed Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants