-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Bug] Resolve error: unable to load resolver "node" import/named with ESLint configured #1427
Comments
Yarn 2 is stricter - see https://next.yarnpkg.com/features/pnp#pnp-loose-mode Enabling loose mode temporarily and running outputs:
Resolve by adding a hint to
|
I migrated from yarn v1 to v2 and it i get the authors error on all my dependencies. Do I have to add each one of them manually now - but also in the future? |
Only if you want to keep using PnP, which you can disable. |
You can resolve the resolver manually in your eslint config to fix the resolution module.exports = {
settings: {
'import/parsers': {
[require.resolve('@typescript-eslint/parser')]: ['.ts', '.tsx', '.d.ts'],
},
'import/resolver': {
[require.resolve('eslint-import-resolver-node')]: {
extensions: [<extensions here>],
},
},
},
}; |
This works for executing |
Describe the bug
I try to use Yarn 2 together with ESLint and Prettier, but I get this error:
Resolve error: unable to load resolver "node" import/named
Resolve error: unable to load resolver "node" import/no-extraneous-dependencies
(and five more errors)
To Reproduce
Clone this git repository: https://github.com/IT-CASADO/yarn-eslint/tree/yarn-v2
(master branch contains the same configuration with Yarn 1)
Execute following command: yarn eslint ./src/.
Environment if relevant (please complete the following information):
Additional context
I followed this steps here:
I'm assuming no configuration errors with ESLint, because it is working with Yarn 1.
Do I miss something special for Yarn 2?
The text was updated successfully, but these errors were encountered: