-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed as duplicate of#3975
Closed as duplicate of#3975
Copy link
Labels
Bugthing that needs fixingthing that needs fixing
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
package with only one dependency:
$ cat package.json
{
"devDependencies": {
"@actions/core": "^1.11.1"
}
}omiting dev dependencies should leave the node_modules empty, but does not
$ npm ci --omit=dev
up to date, audited 1 package in 162ms
found 0 vulnerabilities
$ ls node_modules/
@actions @fastifyit did omit some dependencies though, just not the ones starting with @, see install without omitting:
$ npm ci
added 7 packages, and audited 8 packages in 518ms
found 0 vulnerabilities
$ ls node_modules/
@actions @fastify tunnel undiciExpected Behavior
omiting dev dependencies when only having dev dependencies leaves the node_modules folder empty, as is the case when the dependency does not start with @:
$ cat package.json
{
"devDependencies": {
"axios": "^1.7.9"
}
}
$ npm ci --omit=dev
up to date, audited 1 package in 157ms
found 0 vulnerabilities
$ ls node_modules/
$Steps To Reproduce
echo {} > package.jsonnpm i -D @actions/corenpm ci --omit=devls node_modules/observe that folder is not empty
Environment
- npm: 10.9.2
- Node.js: v22.13.0
- OS Name: Ubuntu 22.04.5 LTS
- System Model Name: Lenovo T15g Gen2
- npm config:
; node bin location = /home/jhenning/.nvm/versions/node/v22.13.0/bin/node
; node version = v22.13.0
; npm local prefix = /home/jhenning
; npm version = 10.9.2
; cwd = /home/jhenning/test
; HOME = /home/jhenning
; Run `npm config ls -l` to show all defaults.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixing