install-peers-cli icon indicating copy to clipboard operation
install-peers-cli copied to clipboard

installation instructions don't actually work

Open cellog opened this issue 5 years ago • 5 comments

I saw a closed issue with this, but I followed these steps:

  1. yarn add -D install-peers-cli
  2. add this script to package.json: "install-peers": "install-peers"
  3. run yarn install-peers

And it gives me:

➜  gollum git:(experiment/cypress) ✗ yarn install-peers
yarn run v1.19.1                                                                                                                                              
$ install-peers                                                                                                                                               
Only run install-peer-deps after `install` command. Skipping.

I saw the note about postinstall, but the reason I am using a peer dependency is that I don't want it to be installed on CI, because it breaks the build. It is only for local dev. So I can't add it to postinstall.

cellog avatar Jan 03 '20 22:01 cellog

looking at the source for the script, it supports the -f option and will override that console message you are seeing. simply running "install-peers -f" worked for me. That said, you still need to run the standard npm install prior to this in order for it to work correctly. Anytime you run npm install, I believe it will wipe out these peer dependencies in node_modules and you would have to follow up your npm install command with an install-peers command.

jward1983 avatar Jan 21 '20 18:01 jward1983

Yep. Same issue here. I guess it has to follow npm install command exactly, otherwise it won't work. I ran npm isntall (which, by the way, is a valid npm command 😅 ) and it threw the same error. So yeah, either running it exactly after npm install command or putting the -f flag should do it.

dwiyatci avatar Feb 27 '20 11:02 dwiyatci

I ran npm install first, but still get this error. It's completely unexpected, even surprising, that the standard command always requires a "force" flag. I'm also concerned this library isn't actively maintained since this issue has been outstanding for three months.

SevenZark avatar Apr 09 '20 16:04 SevenZark

Total npm noob here but shouldn't it be:

    "prepare": "install-peers"

Credit to https://dev.to/yvonnickfrin/how-to-handle-peer-dependencies-when-developing-modules-18fa

It should run at the correct times according to https://docs.npmjs.com/cli/v6/using-npm/scripts#life-cycle-scripts

steinybot avatar Dec 16 '20 06:12 steinybot

Total npm noob here but shouldn't it be:

    "prepare": "install-peers"

Credit to https://dev.to/yvonnickfrin/how-to-handle-peer-dependencies-when-developing-modules-18fa

It should run at the correct times according to https://docs.npmjs.com/cli/v6/using-npm/scripts#life-cycle-scripts

worked like a charm

parifuture avatar Mar 18 '21 22:03 parifuture