cli icon indicating copy to clipboard operation
cli copied to clipboard

[BUG] `npm audit fix --force` not properly moving directories

Open tkiral opened this issue 3 years ago • 0 comments

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

  1. In this environment... (?)
  2. With this config... (?)
  3. Run npm audit fix --force
  4. See error below Screen Shot 2022-08-03 at 13 48 03

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

tkiral avatar Aug 03 '22 17:08 tkiral