-
Notifications
You must be signed in to change notification settings - Fork 140
Error: Cannot find module 'eslint-plugin-react' #270
Comments
I think this has already been fixed in master. I'll tag a release when I am done with the windows support in a few hours |
v5.0.2 is out that fixes this |
@steelbrain I got the same issue with Atom 1.3.1, linter-eslint 5.2.6. Can you give a check?
|
@longseespace you are loading the eslint bundled with this package, is it not detecting the one installed to your project? |
I am having the same issue on Atom 1.3.1 and linter-eslint 5.2.6. This is from my package.json:
none of these is installed globally. I want Atom to use the local ones. |
For future travelers coming across this like I did, my issue was that I was missing this all-important line in my "parser": "babel-eslint" There are a handful of reasons this could in Atom, but for me, this was the culprit. |
Good point! But in my case this doesn't fix the problem. |
@danielbuechele can you post your |
|
@danielbuechele, where do you have ESLint installed, and where do you have the plugins installed? They need to be in the same place. |
eslint and plugins are both installed as local dev-dependencies. |
Can you post the error message you are getting? |
|
It looks like linter-eslint is using the version of ESLint that comes bundled with itself, and is not picking up your local version. What versions are you on (linter-eslint, eslint, etc.)? Do you have a non-standard directory structure? From your project directory, what do you get from |
Atom:
package.json (as devDependencies):
|
What settings do you have enabled for |
Yeah, @danielbuechele if you can simplify your project/repo to make it shareable (the actual code isn't even needed here aside from a single file to test linting on), it'll help speed up troubleshooting. |
Okay, I just created a copy of my project and removed some dependencies and stuff and now it works. I try to figure out what causes the issue. |
Hello! I have the same problem. Which dependencies did you remove to have it working? |
I still couldn't figure out what the problem is. I removed and readded some dependencies, then it was working. Can't say what caused the problem. |
Thanks for the response! I also got it working without identifying the problem... |
I had the same problem with Atom. I have a Windows10 computer without node/npm installed in it. However I installed last version of Atom two days ago. Few hours ago from the time of this message I try to install linter and then linter-eslint using apm (atom package manager). After installation with apm it appeared a simple message for each: "installation done". However when checking for dependencies, those were not found anywhere in the computer, especifically eslint-plugin-react. Error as in this thread. Is Atom still requiring to have npm globally available to complete the installation of linter-eslint? |
@evaristoc
|
Thanks, Arcanemagus. Thought they were shipped together. |
Still no fix, then, this is pretty annoying and is stopping any work I can do in Atom |
The "fix" is to install This is not a bug in |
@IanVS I have all that installed locally and in my project |
Can you please open a new issue and fill out the issue template completely, if you believe this to be a bug? |
After upgrading to Atom 1.2.1, and linter-eslint 5.0.1, I see:
It is not detecting the project-local eslint and eslint-plugin-react. It was working correctly, in the same project, with 1.1.0 and the previous version of linter-eslint.
The text was updated successfully, but these errors were encountered: