-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Documentationdocumentation related issuedocumentation related issuePriority 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
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
When using npm install --production it executes the prepare scripts in version 7+. In version 6 it didn't execute them.
Workaround: npm install --production --ignore-scripts
(Didn't see that the behaviour has changed in the changelog or in the docs, thats why I'm filing it. The workaround is working for us)
Expected Behavior
The prepare script does not get executed.
Steps To Reproduce
- Create this
package.json
{
"name": "npm-install-production-prepare",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"prepare": "echo \"PREPARE GETS EXECUTED\""
},
"keywords": [],
"author": "",
"license": "ISC"
}npm install --production- Observe that the
preparescript gets executed
Environment
- npm: 7.0.0+
- Node: 16
- OS: macOS
- platform: Macbook Pro
damianprzygodzki, xDroni, mxschmitt, illiasendetskyi, TimoStahl and 5 more
Metadata
Metadata
Assignees
Labels
Documentationdocumentation related issuedocumentation related issuePriority 2secondary priority issuesecondary priority issueRelease 8.xwork is associated with a specific npm 8 releasework is associated with a specific npm 8 release