cli
cli copied to clipboard
[BUG] installing with `--no-cache` creates a directory `false`
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
Running npm install --no-cache creates a folder / directory named false alongside the node_modules directory. This is probably the same behaviour as running npm install --cache=false, which is treated as a directory named false.
Expected Behavior
Expect that this option either not exist, or not implicitly behave the same as --cache=false.
There was a previous issue created on this topic in the now-archived npm repo, which was closed. The issue persists, so reopening.
Steps To Reproduce
- In the
node:16image from DockerHub - With the default config, and a basic
package.json - Run
npm install --no-cache - A directory named
falseis created alongside thenode_modulesdirectory
Environment
- npm: 9.6.7
- Node.js: v16.20.0
- OS Name: macOS
- System Model Name: MacBook Pro M1
- npm config:
; "project" config from /workspace/.npmrc
; node bin location = /usr/local/bin/node
; node version = v16.20.0
; npm local prefix = /workspace
; npm version = 9.6.7
; cwd = /workspace
; HOME = /home/vscode
; Run `npm config ls -l` to show all defaults.