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?
Yarn 2 is stricter - see https://next.yarnpkg.com/features/pnp#pnp-loose-mode
Enabling loose mode temporarily and running outputs:
(node:34285) [MODULE_NOT_FOUND] Error: eslint-module-utils tried to access eslint-import-resolver-node, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Resolve by adding a hint to .yarnrc.yml
packageExtensions:
eslint-module-utils@*:
dependencies:
eslint-import-resolver-node: "*"
Most helpful comment
Yarn 2 is stricter - see https://next.yarnpkg.com/features/pnp#pnp-loose-mode
Enabling loose mode temporarily and running outputs:
(node:34285) [MODULE_NOT_FOUND] Error: eslint-module-utils tried to access eslint-import-resolver-node, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.Resolve by adding a hint to
.yarnrc.yml