Currently starting up the server on my client side, the error above is what I have been getting. I am using Typescript, React, ESlint. I can\'t seem to go forward since th
This error occurs because react-scripts
has a direct dependency on the 2.xx range of @typescript-eslint/parser
and @typescript-eslint/eslint-plugin
.
You can fix this by adding a resolutions field to your package.json
as follows:
"resolutions": {
"**/@typescript-eslint/eslint-plugin": "^4.1.1",
"**/@typescript-eslint/parser": "^4.1.1"
}
NPM users: add the resolutions field above to your package.json
but use npx npm-force-resolutions to update package versions in package-lock.json
.
Yarn users: you don't need to do anything else. See selective dependency resolutions for more info.
NOTE: if you're using a monorepo/Yarn workspaces, the resolutions
field must be in the top-level package.json
.
NOTE: yarn add
and yarn upgrade-interactive
don't respect the resolutions
field and they can generate a yarn.lock
file with incorrect versions as a result. Watch out.