Reputation: 11
I’m installing these npm packages:
npm I express body-parser bcrypt cors dotenv gridfs-stream multer multer-gridfs-storage helmet morgan jsonwebtoken mongoose
However, I keep getting an error whenever I download them. It’s an error that states:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/multer
npm ERR! multer@"^1.4.5-lts.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer multer@"^1.4.2" from [email protected]
npm ERR! node_modules/multer-gridfs-storage
npm ERR! multer-gridfs-storage@"^5.0.2" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
What do I do?
I keep trying to install these npm packages but all I keep getting back is this error message
Upvotes: 0
Views: 120
Reputation: 1
This issue is due to gridfs-stream
installation. What you can do is from your commad just remove gridfs-stream
and execute it. After it’s execution, you can use:
npm i gridfs-stream -legacy-peer-deps
This will surely solve your issue. Make sure to upvote this answer.
Upvotes: 0
Reputation: 1
Out of curiosity have you tried installing each individually? I’ve had issues in the past where installing a variety of things at once I had typos and/or issues with the download.
Maybe you could find a certain package providing the error.
Best of luck.
Upvotes: 0