Hello there I am getting some error in my terminal and its say i need to use 4.4.0 version and my current version is …
In my project my current typescript version is given below,
"typescript": "^4.4.2",
"typedoc": "^0.21.8",
"react-scripts": "^3.4.4",
"@typescript-eslint/eslint-plugin": "^4.29.3",
"@typescript-eslint/parser": "^4.29.3",
Moreover, when I am trying to run npm run dev commands or npx eslint . is error are showing me which is given below,
=============
WARNING: You are currently running a version of TypeScript which is not
officially supported by @typescript-eslint/typescript-estree.
You may find that it works just fine, or you may not.
SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <4.4.0
YOUR TYPESCRIPT VERSION: 4.4.2
Please only submit bug reports when using the officially supported
version.
=============
How can i fix this issue and I have done a lot of research in google but nothing is working. It would be great help for me.
3
Answers
Try using a typescript version between >=3.3.1 <4.4.0.
Here you have the list of typescript versions available.
After changing the version, remove node_modules folder and package-lock.json file. Then execute
npm install
I wouldn’t downgrade my Typescript, as you will miss out on newer TS features – I would find a way to update
@typescript-eslint/typescript-estree
.You might not have this installed directly and this might be a dependancy of another package,
@typescript-eslint/experimental-utils
which is dependancy of@typescript-eslint/eslint-plugin
for instance, so track down the parent package in youryarn.lock / package.lock
file and bump it, as a result it should bump@typescript-eslint/typescript-estree
too.I was struggling with the same warning. Solved it by updating eslint and related packages to the latest by running:
npm i eslint@latest @typescript-eslint/parser@latest @typescript-eslint/eslint-plugin@latest --save
Now, I have the following versions in my package.json and I am not receiving the warning anymore