Open chackerian opened 2 years ago
maybe npm i --legacy-peer-deps
should works. This command will ignore the peer dependencies. By default, now npm is installing and validating peer deps
A better way is to use the "overrides" property of package.json. See https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides
For example, I have "typescript": "^5.1.6"
in devDependencies
and then I have a top level package.json property
"overrides": {
"typescript": "$typescript"
},
The dollar notation means it uses the exact value as specified in devDependencies
- "overrides" only works if the version in "overrides" is exactly(!) the same as the one specified elsewhere. So having a version in "dependencies" or in "devDependencies", but then a "*"
in "overrides" would be ignored, for example.
I'm getting this error when trying to use the package.
How can I properly install this? I have tried using --force and this doesn't work either.