-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Open
Labels
Bugthing that needs fixingthing that needs fixingPriority 2secondary priority issuesecondary priority issueRelease 8.xwork is associated with a specific npm 8 releasework is associated with a specific npm 8 release
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
When using the command npm install --production npm creates (and/or fails to remove during execution) empty directories for some devDependencies.
Expected Behavior
When using the command npm --production I expect npm to install only the packages listed in dependencies, omit the packages listed in devDependencies and not create/leave behind empty directories for any devDependency packages.
Steps To Reproduce
- Create a new directory with the following package.json:
{
"name": "npm-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"dayjs": "^1.10.7"
},
"devDependencies": {
"webpack-cli": "^4.9.1"
}
}
- Execute the following command:
npm install --production - Note that npm has created (and/or not removed during execution) empty directories that correspond to some devDependencies. (See attached screenshot).
Environment
- OS: Windows 10
- Node: v16.13.0
- npm: 8.1.0
russau, thisconnect, ericmorand, jcmorrow, simonmcallister0210 and 4 more
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingPriority 2secondary priority issuesecondary priority issueRelease 8.xwork is associated with a specific npm 8 releasework is associated with a specific npm 8 release
