-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
import/no-unresolved error with 'node:' URLs (Node.js ESM) #2372
Comments
What version of node are you using? If you're seeing this error in your editor, then what version of node is your editor using? a) this plugin does not explicitly support native ESM, it expects transpiled ESM, which means that |
I'm using Node.js v17.3.0. I'm assuming my editor (Code - OSS) is using the same. I tested it and it actually seems that the error only shows up in the editor, but not when I run eslint from the command-line. I didn't know that this plugin does not support native ESM. I'm using Maybe my eslint editor plugin is somehow misconfigured, although I don't know what setting it could be. |
vscode has an embedded node, which i believe is v12. The command line is the source of truth, so it's a problem you'll have to fix in your editor. TS also isn't native ESM, it's a transpiler (which is better than native anyways). |
Just found out, in vscode one can set |
ECMAScript modules in Node.js support importing Node.js builtin modules using
node:
URLs (see the documentation), for example:Using such URLs causes eslint-plugin-import to raise an
import/no-unresolved
error.The text was updated successfully, but these errors were encountered: