pnpm: eslint can't find plugins when run from pnpm binstubs
I’m trying to use eslint plugins (e.g. eslint-plugin-jest) with pnpm and WebStorm. eslint works fine from the command line and can use the plugins, but when Webstorm runs the eslint binstub, it fails with
Failed to load plugin jest: Cannot find module ‘eslint-plugin-jest’
Since this seemed like a WebStorm issue, I’ve filed https://youtrack.jetbrains.com/issue/WEB-36548. WebStorm developers replied there, saying it might be a pnpm issue. @zkochan, can you please take a look?
The issue is rather critical because it essentially makes it impossible to use eslint with pnpm in WebStorm (since most projects use an eslint plugin or config).
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (14 by maintainers)
Commits related to this issue
- Fixing build error on Windows — committed to wasm-tool/rollup-plugin-rust by Pauan 4 years ago
Well, this feature will be better if integrated into pnpm. I was working on it a few weeks ago. I guess I can try to finish it. https://github.com/pnpm/pnpm/commit/f1fdcd1c2787d29982795a90ea0c0c75d65d8806
I can reproduce the problem without WebStorm. When calling
node_modules/eslint/bin/eslint.js *.jsfrom theadirectory, eslint can’t find the plugin:pnpm 2.25.2.
Hahaha oh well then yes it works, because I’m using that now.