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 was archived by the owner on Aug 11, 2022. It is now read-only.
The problem here is that invoking npm rm module may cause the node_modules tree to be in an invalid state because npm rm is not dedupe aware.
Reproduction case:
mkdir ~/tmp/foobar
cd~/tmp/foobar
npm init
npm i routes@1.1.0 -S
npm i routes-router@3.3.0 -S
npm ls
echo"npm ls is good $?"
npm rm routes -S
npm ls
echo"npm ls should be good but is bad $?"
The expected output is that the second npm ls exits zero instead of one.
Suggested fix:
Break the logic that is lib/update.js that finds all copies of module in a node_modules tree out into a function.
Then use that function to find all copies in lib/uninstall.js and then just invoke npm.commands.install for each one.
The text was updated successfully, but these errors were encountered:
This is a "dependency tree realization" bug.
The problem here is that invoking
npm rm module
may cause the node_modules tree to be in an invalid state becausenpm rm
is not dedupe aware.Reproduction case:
The expected output is that the second
npm ls
exits zero instead of one.Suggested fix:
Break the logic that is
lib/update.js
that finds all copies of module in a node_modules tree out into a function.Then use that function to find all copies in
lib/uninstall.js
and then just invokenpm.commands.install
for each one.The text was updated successfully, but these errors were encountered: