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
Had to add the dependencies manually, even when it gave a warning of incompatibility, because the npm-force-resolutions
solution did not work for me.
package.json
(dependencies
because I'm using create-react-app, which I have never seen to use devDependencies
):"dependencies": {
"@typescript-eslint/eslint-plugin": "^4.1.1",
"@typescript-eslint/parser": "^4.1.1",
}
Then, I do rm -rf node_modules/
so I can have a clean install of npm stuff.
Next, install everything: npm install
.
Check that you have the correct version: npm ls @typescript-eslint/eslint-plugin
. It said UNMET PEER DEPENDENCY
but I had to ignore it because otherwise I could not get this working.
npm start
to make sure the create-react-app now works.
I'd advice going for the npm-force-resolutions solution first, but if it fails try this one.
Oh, and one extra note:
This entire disaster was because I did something like this:
interface SomeInterface {
someBoolean: boolean,
someList: number[],
someTuple: [string, string] // <-- THIS is the problem
}
If I removed that commented line, the code would compile without issues. I kept it that way because I had already made my code to work like that, but if you just avoid having a tuple inside the interface (didn't matter if it had labels or not), you can potentially avoid all this hassle.