node.jsnpmpackagenpm-installconnect-mongo

Unable to install a dependency, tried installing an npm package with --legacy-peer-deps


Compatibility error with installed dependencies

Tried changing the version of the dependency to 6.1.0 in package.json file

After changing the version, I tried re-installing but the problem still persists

After trying --legacy-peer-deps

error from "npm install command"

I tried to install (connect-mongo) package "npm install connect-mongo" which led me to this error.

Then I tried changing the version of the dependency to 6.1.0 in package.json file

But still got the error message

then I had to try and do "npm install connect-mongo --legacy-peer-deps"

but the error still persists

Would I be able to use the package after doing "npm install connect-mongo --legacy-peer-deps"?


Solution

  • I don't know if this might help (or if you tried it) but when I face a similar situation I delete the node modules folder and try the installation again using the --legacy-peer-deps