install-peerdeps icon indicating copy to clipboard operation
install-peerdeps copied to clipboard

Not updating package.json when using locally installed version

Open okonet opened this issue 7 years ago • 7 comments

When I'm using it in the postinstall script (https://github.com/okonet/eslint-config-okonet/blob/master/package.json#L11), the package.json won't updated and I still get npm warnings:

Projects/OSS/attr-accept on  fix-eslint-errors [!] is 📦 v via ⬢ v8.1.3 took 15s 
➜ npmD eslint-config-okonet@latest             

> [email protected] postinstall /Users/okonet/Projects/OSS/attr-accept/node_modules/eslint-config-okonet
> install-peerdeps eslint-config-okonet --dev --only-peers

install-peerdeps v1.2.0
Installing peerdeps for [email protected].
npm install babel-eslint@* [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] prettier@* --save-dev

+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
added 237 packages in 14.543s
SUCCESS The peerDeps of eslint-config-okonet were installed successfully.
npm WARN [email protected] requires a peer of babel-eslint@* but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.

+ [email protected]
added 15 packages, removed 67 packages and updated 1 package in 23.65s

~~Additionally, when running manually, I see duplicated success message:~~

okonet avatar Sep 13 '17 09:09 okonet

Okay I think the second message is coming from my postinstall script so I've updated the issue

okonet avatar Sep 13 '17 09:09 okonet

Thanks for the issue - I can't look at this right now, but in the meantime if you find out what's going on please let me know.

I have a feeling the issue might be in the spawn call, perhaps you could check that out? (e.g. console.log the arguments)

nathanhleung avatar Sep 14 '17 00:09 nathanhleung

Related SO question: https://stackoverflow.com/questions/41531609/install-npm-package-on-postinstall

okonet avatar Sep 14 '17 10:09 okonet

Related issue: https://github.com/npm/npm/issues/17732

okonet avatar Sep 14 '17 10:09 okonet

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 21 '19 00:12 stale[bot]

oof, stalebots are so user hostile :-/

ljharb avatar Dec 21 '19 00:12 ljharb

oof, stalebots are so user hostile :-/

fair point, I figured it'd encourage people who really wanted a feature to keep pushing for it, but given the low number of issues on second thought it's really not that necessary (I just removed it)

nathanhleung avatar Dec 22 '19 20:12 nathanhleung