Skip to content

“Definition for rule '@typescript-eslint/consistent-type-assertions' was not found” #7711

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
arielvol opened this issue Sep 21, 2019 · 3 comments

Comments

@arielvol
Copy link

Hi,

There is a bug in the Create-react-app CLI.
Currently if you use and old package.json that has the : react-scripts: ^3.1.1 version.
and you run npm i and then try to rum the site (npm start) you get the following error:

“Definition for rule '@typescript-eslint/consistent-type-assertions' was not found”

I solved this by deleting the node_module entirely, then I updated my package.json file to use the "react-scripts: 3.1.2" version. then i run the npm i again, and it fixed the issue.

It looks like the new create-react-app doesn't backward support the react-scripts: 3.1.1 version.

Please check this ASAP since I already see posts in StackOverflow, meaning a lot of people are going to encounter this issue.

Thanks.

@ianschmitz
Copy link
Contributor

ianschmitz commented Sep 21, 2019

Thanks for the report. Likely because of our carat dependency on eslint-config-react-app. I imagine you're now seeing peer dependency warnings for @typescript-eslint/* packages as well?

/cc @iansu.

@ianschmitz
Copy link
Contributor

ianschmitz commented Sep 21, 2019

@iansu i forgot we had peer deps on @typescript-eslint packages, so should have likely been released as a breaking change for eslint-config-react-app. Probably worth re-evaluating including direct dependencies instead of peer deps for some in eslint-config-react-app?

@ianschmitz
Copy link
Contributor

Going to close as a dupe of #7709. Can continue discussion over there.

@lock lock bot locked and limited conversation to collaborators Sep 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants