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
{{ message }}
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
Clear all node_modules, package.json, package-lock.json, etc. from your tree.
mkdir lol;
echo '{"name":"lol","dependencies":{"express":""}}'>lol/package.json
mkdir -p lol2/node_modules;
cd lol2;
npm i ../lol;
This is ok. lol will get express installed into itself as expected. But then...
npm i ../lol; # yes, install same thing again
Now this will report updated 1 package in 0.515s, but what it actually did is blow away all deps of lol, so that install is broken. But if you do it again...
npm i ../lol; # yes, install same thing again
Now you get back the deps and the install is ok. If you install again it will flip-flop between corruption and ok install.
Basically, npm i is non-idempotent (and corrupting) for local sibling dir installs. This seems to be the case regardless of whether you're shrinkwrapping or not.
Possibly related: #16839. But I didn't see this exact case mentioned there.
The text was updated successfully, but these errors were encountered:
avaer
changed the title
Npm flipflops on deps corruption during sibling dir installs
Npm5 flipflops on deps corruption during sibling dir installs
Jun 7, 2017
I'm opening this issue because:
What's going wrong?
How can the CLI team reproduce the problem?
node_modules
,package.json
,package-lock.json
, etc. from your tree.This is ok.
lol
will getexpress
installed into itself as expected. But then...Now this will report
updated 1 package in 0.515s
, but what it actually did is blow away all deps oflol
, so that install is broken. But if you do it again...Now you get back the deps and the install is ok. If you install again it will flip-flop between corruption and ok install.
Basically,
npm i
is non-idempotent (and corrupting) for local sibling dir installs. This seems to be the case regardless of whether you're shrinkwrapping or not.Possibly related: #16839. But I didn't see this exact case mentioned there.
supporting information:
npm -v
prints: 5.0.3node -v
prints: v8.0.0npm config get registry
prints: https://registry.npmjs.org/The text was updated successfully, but these errors were encountered: