[BUG] `npm audit fix --force` not properly moving directories
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the directory-move failure with npm 8.16.0, Node.js v18.7.0, and the described macOS environment; the issue provides no source files or tests to begin from. Done means npm audit fix --force correctly moves directories and their associated files and subdirectories without requiring manual copying and deletion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100