[BUG] --force
doesn't work as intended when automatically removing node_modules
symlinks
#4358
Open
2 tasks done
Labels
Bug
thing that needs fixing
Priority 2
secondary priority issue
Release 8.x
work is associated with a specific npm 8 release
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
If I have a symlink called
node_modules
to a different directory, then npm will remove this symlink and create a real folder. This has been introduced in npm/arborist@f2b0cee as a safety feature, but as it doesn't disable it as specified when using--force
option.Other people have similar problems too:
Expected Behavior
It should work as intended in npm/arborist@f2b0cee (don't remove symlink if
--force
).I really needed this thing to work, so I had to downgrade npm to an older version.
Steps To Reproduce
npm init -y
ln -s your_folder_name node_modules
npm install --force <any package name>
node_modules
no longer points toyour_folder_name
Environment
; this only showed comments and registry auth token "(protected)"
The text was updated successfully, but these errors were encountered: