install-peers-cli
install-peers-cli copied to clipboard
installation instructions don't actually work
I saw a closed issue with this, but I followed these steps:
-
yarn add -D install-peers-cli
- add this script to package.json:
"install-peers": "install-peers"
- 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.
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.
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.
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.
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
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