Skip to content

Cannot find module 'eslint-plugin-react' in production #2270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
likeuwill opened this issue May 11, 2019 · 3 comments
Closed

Cannot find module 'eslint-plugin-react' in production #2270

likeuwill opened this issue May 11, 2019 · 3 comments

Comments

@likeuwill
Copy link

Just for info.
To fix issue, "eslint-plugin-react": "^7.13.0" should be added to the main dependencies instead of devDependencies.

P.S. With "react-scripts": "^2.1.8" all was fine, but starting from v.3 error was founded.

@ljharb
Copy link
Member

ljharb commented May 12, 2019

Why would you be running the linter in production?? linters are a dev dep, and are never installed in production.

@likeuwill
Copy link
Author

Why would you be running the linter in production?? linters are a dev dep, and are never installed in production.

Yes, but...
https://stackoverflow.com/questions/54677395/error-failed-to-load-plugin-import-cannot-find-module-eslint-plugin-import-w

@ljharb
Copy link
Member

ljharb commented May 12, 2019

ok - since that’s a problem with CRA and not this plugin (or the rest of the eslint-using ecosystem), and since that SO question answers it, I’m going to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants