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

Resolve error: unable to load resolver "node" #1730

Closed
tunnckoCore opened this issue Feb 11, 2018 · 3 comments
Closed

Resolve error: unable to load resolver "node" #1730

tunnckoCore opened this issue Feb 11, 2018 · 3 comments

Comments

@tunnckoCore
Copy link

tunnckoCore commented Feb 11, 2018

Can't understand what's the problem and how this is possible...

I just simply install airbnb config and its devDeps. Then just running eslint on 1-line .js file.

/home/charlike/code/rolldown/src/foo.js
  1:1   error  Resolve error: unable to load resolver "node"                                               import/no-unresolved
  1:1   error  Resolve error: unable to load resolver "node"                                               import/no-extraneous-dependencies
  1:1   error  'babylon' should be listed in the project's dependencies. Run 'npm i -S babylon' to add it  import/no-extraneous-dependencies
  1:1   error  Resolve error: unable to load resolver "node"                                               import/no-duplicates
  1:1   error  Resolve error: unable to load resolver "node"                                               import/extensions
  1:1   error  Resolve error: unable to load resolver "node"                                               import/no-named-as-default
  1:1   error  Resolve error: unable to load resolver "node"                                               import/no-named-as-default-member
  1:8   error  'babylon' is defined but never used                                                         no-unused-vars
  1:21  error  Unable to resolve path to module 'babylon'                                                  import/no-unresolved
  1:21  error  Missing file extension for "babylon"                                                        import/extensions

I'm seeing that there is eslint-import-resolver-node as dependency at eslint-plugin-import, so it not make sense.

@tunnckoCore
Copy link
Author

Damn, i knew that. It's because Pnpm is "strict"

Strict. A package can access only dependencies that are specified in its package.json.

Probably installing eslint-import-resolver-node as dependency here will fix the issue, not sure.

@tunnckoCore
Copy link
Author

continuation: pnpm/pnpm#1042

@zkochan
Copy link

zkochan commented Feb 11, 2018

FYI, there's a related issue at eslint-plugin-import (import-js/eslint-plugin-import#828) and it has nothing to do with pnpm's strictness. The issue is caused because eslint-plugin-import preserves symlinks when it searches for "plugins". Node does not preserve symlinks when it resolves modules. Neither should eslint-plugin-import

shadow81627 pushed a commit to shadow81627/pocketpasta that referenced this issue Aug 1, 2021
shadow81627 added a commit to shadow81627/pocketpasta that referenced this issue Aug 1, 2021
* chore(deps): yarn

* chore(deps): yarn 2

* chore(deps): add eslint-plugin-vue

* chore(gitignore): yarn releases and plugins binary

* chore(yarn): vscode sdk

* chore(deps): eslint-plugin-vuetify

* chore(deps): update lock file

* chore(node): enginer strict

* chore(yarn): default semver range empty

* chore(deps): add missing transitive

* chore(deps): add eslint-import-resolver-node

airbnb/javascript#1730 (comment)

* style: lint fix

* chore(deps): add missing

* chore(deps): add debug

* chore(deps): add semver

* fix(footer): releases link text fallback

* chore(codecept): always headless

* chore(config): remove travis commit env

Co-authored-by: Damien Robinson <damien.robinson@daim.dev>
dididy added a commit to mash-up-kr/mash-up-admin-fe that referenced this issue Jan 20, 2022
yarn create @eslint/config
airbnb/javascript#1730
eslint-import-resolver-node
dididy added a commit to mash-up-kr/mash-up-admin-fe that referenced this issue Jan 20, 2022
yarn create @eslint/config
airbnb/javascript#1730
eslint-import-resolver-node
dididy added a commit to mash-up-kr/mash-up-admin-fe that referenced this issue Jan 20, 2022
yarn create @eslint/config
airbnb/javascript#1730
eslint-import-resolver-node
poiu694 added a commit to poiu694/webpack-boilerplate that referenced this issue May 1, 2022
yarn create @eslint/config \n airbnb/javascript#1730 => eslint-import-resolver-node
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

No branches or pull requests

2 participants