cli
cli copied to clipboard
[BUG] `npm audit fix --force` not properly moving directories
Is there an existing issue for this?
- [X] I have searched the existing issues
This issue exists in the latest npm version
- [X] I am using the latest npm
Current Behavior
npm audit fix --force is consistently not correctly moving directories and their associated files and subdirectories. This has meant the only way to proceed is to manually recursively copy then delete from whatever source and target directories that are necessary for the fix. The examples I've come across are for the acorn-walk, acorn-globals and babel-loader projects, but I'm assuming I will come across more as I continue.
Expected Behavior
npm audit fix --force is able to move directories as expected when making updates.
Steps To Reproduce
- In this environment... (?)
- With this config... (?)
- Run
npm audit fix --force - See error below

Environment
- npm: 8.16.0
- Node.js: v18.7.0
- OS Name: macOS Monterey 12.5
- System Model Name: Apple MacBook Air (13", M1, 2020)
- npm config:
; node bin location = /Users/tkiral/.nvm/versions/node/v18.7.0/bin/node
; node version = v18.7.0
; npm local prefix = /Users/tkiral/projects/humble_phones
; npm version = 8.16.0
; cwd = /Users/tkiral/projects/humble_phones
; HOME = /Users/tkiral