question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[no-unresolved]: Unable to resolve path to module with node: protocol specifier

See original GitHub issue

Hi 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:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:35 (23 by maintainers)

github_iconTop GitHub Comments

2reactions
karlhorkycommented, Apr 24, 2021

Ah yeah, in VSCode ESLint extension, it’s still using Node 12:

ESLint server running in node v12.18.3

But on the command line, all is good! 🙌

1reaction
karlhorkycommented, Apr 20, 2022

If it’s a monorepo, you may have a central yarn.lock or package-lock.json file that contains the older versions of is-core-module, which you may be able to manually upgrade - for example, upgrading a version in yarn.lock by hand like this: https://www.youtube.com/watch?v=iOYTpHRzL0A

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found