-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
eslint-config-react-app > @typescript-eslint/parser missing typescript? #8745
Comments
Hi, I have the same problem. Started to happen once I updated react and react-dom from 16.10.0 and react-scripts from 3.2.0.
|
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
you can fix this by adding
|
Having a same problem with latest create-react-app version |
having exact same problem: Kernel: 4.15.0-99-generic x86_64 bits: 64 compiler: gcc v: 7.5.0 Desktop: Xfce 4.14.1 |
I think this is related to #6834 (reported on April 2019). |
|
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue. |
Describe the bug
Running:
npx eslint .
Returns:
Failed to load parser '@typescript-eslint/parser' declared in 'package.json » eslint-config-react-app#overrides[0]': Cannot find module 'typescript'
Did you try recovering your dependencies?
Tried reinstalling everything, sadly it didn't work.
I've also tried installing typescript as described in the error but it was lacking a tsconfig.json and I also doubt I should have one if this is not a typescript project.
Environment
Steps to reproduce
(Write your steps here:)
npx create-react-app myapp
cd myapp
npx eslint .
Expected behavior
It should have ran eslint.
Actual behavior
Additional resources
Based on my investigation it might be related to how eslint is now resolving configuration:
https://eslint.org/docs/user-guide/migrating-to-6.0.0#package-loading-simplification
Which I have found here:
standard/semistandard#249
EDIT: although now I think about it it's probably a different issue: their case the plugin was missing but in my case the plugin is found but the plugin is missing typescript as a peerdep.
https://github.com/facebook/create-react-app/blob/master/packages/eslint-config-react-app/package.json#L19
and this optional: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/package.json#L56 is not really optional
Might also be related
eslint/eslint#12376
The text was updated successfully, but these errors were encountered: