[no-unresolved]: Unable to resolve path to module with node: protocol specifier
See original GitHub issueHi there, thanks for this plugin, super useful! 👍
Ran into an issue when using the new node:
prefix for builtin / core modules (currently in v16, but will be backported): import/no-unresolved
cannot resolve the path to the module:
import fs from 'node:fs';
~~~~~~~
^---- Unable to resolve path to module 'node:fs' eslint(import/no-unresolved)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:35 (23 by maintainers)
Top Results From Across the Web
Using eslint with typescript - Unable to resolve path to module
In my eslintrc.js config file, the "import/resolver" object needed to sit within the "rules" node, not the " ...
Read more >`import/no-unresolved` unable to resolve in a monorepo with ...
I'm trying to set up path-mapping in a mono-repo. It is working fine, but the import/no-unresolved rule is unable to resolve the paths....
Read more >Module Resolution - webpack
A resolver is a library which helps in locating a module by its absolute path. A module can be required as a dependency...
Read more >failed to resolve module specifier "fs" - You.com
Passing something like 'fs' to import depends on Node.js style module resolution. Node.js will search the contents of the node_modules .
Read more >eslint error import/no-unresolved - Atlassian Community
For my React app, my .env file has the following entry: NODE_PATH=./src. This allows me to use absolute paths when importing packages.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ah yeah, in VSCode ESLint extension, it’s still using Node 12:
But on the command line, all is good! 🙌
If it’s a monorepo, you may have a central
yarn.lock
orpackage-lock.json
file that contains the older versions ofis-core-module
, which you may be able to manually upgrade - for example, upgrading a version inyarn.lock
by hand like this: https://www.youtube.com/watch?v=iOYTpHRzL0A