Cannot find module 'eslint-plugin-react' with eslint --init
See original GitHub issue- ESLint Version: 4.5.0
- Node Version: 6.11.2
- npm Version:3.10.10
- operating system:windows 10 pro
What parser (default, Babel-ESLint, etc.) are you using?
Please show your full configuration:
Configuration
What did you do? Please include the actual source code causing the issue.
i installed eslint globally by the command npm install eslint -g
then i run the comand eslint --init
How do you like to configure ESLint?
>> Inspect your javascript file(s)
How would you like to configure ESLint?
>> ./
What format do you want your config file to be in?
>> javascript
Are you using ECMAScript 6 features?
>> y
Are you using ES6 modules?
>> y
Where will your code run?
>> Node
Do you use CommonJS?
>> y
Do you use JSX?
>> y
Do you use React?
>> y
Installing eslint-plugin-react@latest
rocket@0.0.1 D:\projects\rocket
`-- eslint-plugin-react@7.3.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.1 (node_modules\react-native\node_modules\jest-haste-map\n
ode_modules\sane\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any
"} (current: {"os":"win32","arch":"x64"})
Failed to load plugin react: Cannot find module 'eslint-plugin-react'
Error: Failed to load plugin react: Cannot find module 'eslint-plugin-react'
at Function.Module._resolveFilename (module.js:469:15)
at Function.resolve (internal/module.js:27:19)
at Plugins.load (C:\Users\manas\AppData\Roaming\npm\node_modules\eslint\lib\config\plugins.js:133:29)
at Array.forEach (native)
at Plugins.loadAll (C:\Users\manas\AppData\Roaming\npm\node_modules\eslint\lib\config\plugins.js:173:21)
at processText (C:\Users\manas\AppData\Roaming\npm\node_modules\eslint\lib\cli-engine.js:165:30)
at processFile (C:\Users\manas\AppData\Roaming\npm\node_modules\eslint\lib\cli-engine.js:245:18)
at executeOnFile (C:\Users\manas\AppData\Roaming\npm\node_modules\eslint\lib\cli-engine.js:585:25)
at fileList.forEach.fileInfo (C:\Users\manas\AppData\Roaming\npm\node_modules\eslint\lib\cli-engine.js:622:13)
at Array.forEach (native)
What did you expect to happen?
What actually happened? Please include the actual, raw output from ESLint.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
eslint in terminal Cannot find module 'eslint-config-react-app'
I think if you add the module mentioned in the error message ( eslint-config-react-app ) it should work? eg. yarn add --dev ...
Read more >eslint-plugin-react - npm
Start using eslint-plugin-react in your project by running `npm i ... It will default to "latest" and warn if missing, and to "detect"...
Read more >Using globally installed "standard" package causes "Cannot ...
Using globally installed "standard" package causes "Cannot find module 'eslint-plugin-react'" error. 4.
Read more >eslint/eslint - Gitter
Hi, I can't figure out how to npm-install eslint: $ node --version v10.22.0 $ npm --version 6.14.8 $ npm init #... init from...
Read more >Basic Features: ESLint - Next.js
If you don't already have ESLint configured in your application, you will be guided through the installation and configuration process. yarn lint #...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am using eslint v4.5.0 and this is no more a problem. This works fine
@manastunga787 Is this still an issue for you? How are you actually running eslint? It’s still not clear to me when you’re seeing this error.