cli icon indicating copy to clipboard operation
cli copied to clipboard

[BUG] installing with `--no-cache` creates a directory `false`

Open loucadufault opened this issue 2 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

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

  1. In the node:16 image from DockerHub
  2. With the default config, and a basic package.json
  3. Run npm install --no-cache
  4. A directory named false is created alongside the node_modules directory

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.

loucadufault avatar Jun 27 '23 16:06 loucadufault