DEV Community

loading...

Discussion on: How to handle peer dependencies when developing modules

Collapse
yvonnickfrin profile image
🦁 Yvonnick FRIN Author • Edited

Hi Juan David Nicholls Cardona. Did you have this message using install-peer-deps in the prepare script ?

Collapse
jdnichollsc profile image
J.D Nicholls

yes, but only using npm, it was fixed by using yarn instead, thanks!

Thread Thread
sevenzark profile image
Dave M

It's unfortunate that someone would make a package that only works with yarn! We can't just change our standards to use yarn just for one library. :(

Thread Thread
sevenzark profile image
Dave M

Okay, I got it to work with npm by appending the force flag (-f), so my script command is now "install-peers -f". Seems to be a bug in the library and there is an open github issue already about this.

Thread Thread
urrutiamartin profile image
Urrutia Martin

You can use "postinstall": "install-peers", this command run after the package is installed.
This work for me.