DaniJG / sinon-mongo

A Node library that simplifies writing unit tests using sinon for mocking code using the MongoDB client.
MIT License
4 stars 5 forks source link

Unable to resolve dependency tree #7

Closed pdanysz closed 3 years ago

pdanysz commented 3 years ago

Hi,

I would like to use this library, but is seems there are some problems with depedencies. Can you have a look?

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: engine@3.15.2-1103
npm ERR! Found: mongodb@3.6.3
npm ERR! node_modules/mongodb
npm ERR!   mongodb@"^3.6.2" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer mongodb@"> 3" from sinon-mongo@1.0.2
npm ERR! node_modules/sinon-mongo
npm ERR!   sinon-mongo@"*" 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.
npm ERR! 

Thanks in advance.

DaniJG commented 3 years ago

Thanks for the catch @pdanysz ! Looks like npm 7 is more strict about peerDependencies and I had wrongly defined the one for mongodb.

I have corrected the definition of the peerDependency, updated all the devDependencies (keeping happy dependabot in the meantime 😁 ) and published a new version 1.1.0

Can you try again?

pdanysz commented 3 years ago

Thanks for switft update. I will check it :)