standard: Error: Cannot find module 'eslint-plugin-react' (v3.8.0)
I updated from 3.7.3 to 3.8.0 and seem to be getting the following error:
Error: Cannot find module ‘eslint-plugin-react’
$ ./node_modules/.bin/standard --version
3.7.3
$ npm test
> restmail-autoauth@1.0.0 test /Users/pdehaan/dev/github/restmail-autoauth
> standard
$ npm i standard@latest -D
npm WARN package.json restmail-autoauth@1.0.0 No repository field.
npm WARN package.json restmail-autoauth@1.0.0 No README data
npm WARN prefer global standard@3.8.0 should be installed with -g
standard@3.8.0 node_modules/standard
...
$ ./node_modules/.bin/standard --version
3.8.0
$ npm test
> restmail-autoauth@1.0.0 test /Users/pdehaan/dev/github/restmail-autoauth
> standard
standard: Unexpected linter output:
Error: Cannot find module 'eslint-plugin-react'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at /Users/pdehaan/dev/github/restmail-autoauth/node_modules/eslint/lib/cli-engine.js:107:26
at Array.forEach (native)
at loadPlugins (/Users/pdehaan/dev/github/restmail-autoauth/node_modules/eslint/lib/cli-engine.js:98:21)
at processFile (/Users/pdehaan/dev/github/restmail-autoauth/node_modules/eslint/lib/cli-engine.js:179:5)
at /Users/pdehaan/dev/github/restmail-autoauth/node_modules/eslint/lib/cli-engine.js:332:26
at walk (/Users/pdehaan/dev/github/restmail-autoauth/node_modules/eslint/lib/util/traverse.js:81:9)
If you think this is a bug in `standard`, open an issue: https://github.com/feross/standard
npm ERR! Test failed. See above for more details.
npm ERR! not ok code 0
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 16 (5 by maintainers)
reinstalled
standardglobally and now runningstandardornpm testdoes not produce any errors 👍 A little odd but I’m not complainingThat seemed to do it. Sorry for the noise.
Looks like an npm demon 😉
Try removing the
node_modulesfolder in your app and reinstalling.👍 👍 👍
Glad you got it figured out. Thanks @pdehaan
@anthonybrown I’m a bit confused… Are you using a globally installed
$ standarddirectly, or running it locally via$ npm test? The error message above seems to be pointing to a global looking (but maybe not)/usr/local/lib/node_modules/directory.I’d expect
$ npm testto work (assuming all your other local dependencies are installed), but I’d probably expect running$ standarddirectly to fail, unless you had all the other ESLint plugins also installed globally.