You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My head is spinning trying to describe this, so hopefully I can explain myself clearly. You have two fictitious libraries:
lib-js which uses npm-force-resolutions
app-js which uses lib-js
I assert that lib-js should be doing this in its package.json:
"prepublish": "npx npm-force-resolutions"
...not what's currently specified in the README, which is this:
"preinstall": "npx npm-force-resolutions"
Why? Because "preinstall" runs npm-force-resolutions when app-js does an install, where it has no business running. It causes issues such as this.
"prepublish" OTOH should only run npm-force-resolutions when devs of lib-js do a publish or install, which is when you actually want it to run, since its job is to update package-lock.json, not mess with the installs of consuming packages.
Please let me know if I'm misunderstanding something.
The text was updated successfully, but these errors were encountered:
My head is spinning trying to describe this, so hopefully I can explain myself clearly. You have two fictitious libraries:
lib-js
which usesnpm-force-resolutions
app-js
which useslib-js
I assert that
lib-js
should be doing this in itspackage.json
:...not what's currently specified in the README, which is this:
Why? Because
"preinstall"
runsnpm-force-resolutions
whenapp-js
does an install, where it has no business running. It causes issues such as this."prepublish"
OTOH should only runnpm-force-resolutions
when devs oflib-js
do a publish or install, which is when you actually want it to run, since its job is to updatepackage-lock.json
, not mess with the installs of consuming packages.Please let me know if I'm misunderstanding something.
The text was updated successfully, but these errors were encountered: