-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next steps
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
Discovered here: electron-userland/electron-builder#9259
A clean npm install
produces different results on the first and second run.
Expected Behavior
npm install
should produce the same results each time.
Steps To Reproduce
On mac, ignoring scripts just in case:
npm install -g npm@latest
mkdir test && cd test
npm init -y
npm install --ignore-scripts @abandonware/noble
# added 156 packages, and audited 157 packages in 972ms
npm install --ignore-scripts
# changed 12 packages, and audited 157 packages in 542ms
The second install shows "changed 12 packages" which is unexpected. This is also reproducible installing from package/lock files.
rm -rf node_modules
npm install --ignore-scripts
# added 156 packages, and audited 157 packages in 1s
npm install --ignore-scripts
# changed 12 packages, and audited 157 packages in 553ms
The different results are visible in the FS by diffing the output of find node_modules
before and after.
Environment
- npm: 11.5.2
- Node.js: v22.14.0
- OS Name: MacOS
- System Model Name: Macbook Pro M4
- npm config:
; node bin location = /Users/liam.mitchell/.local/share/fnm/node-versions/v22.14.0/installation/bin/node
; node version = v22.14.0
; npm local prefix = /Users/liam.mitchell/npm-install
; npm version = 11.5.2
; cwd = /Users/liam.mitchell/npm-install
; HOME = /Users/liam.mitchell
TillFProtzek
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next steps