You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Executing npm ci ignores the os field in package.json. This causes platform specific packages like fsevents (macOS-only) to be installed on other platforms (Windows in this case).
When
Every install through npm ci
Where
Packages with the os field specified in package.json
How
Current Behavior
See description
Steps to Reproduce
Run npm init in a new directory on a windows machine
Install a package with a deeply nested optional dependency on fsevents, like webpack: npm i webpack
Notice a package-lock.json is created with an optional dependency on [email protected]
Remove node_modules te create a clean CI clone state
Run npm ci
See the installation fail because fsevents is downloaded, installed, and node-gyp is executed as a result.
Expected Behavior
fsevents is skipped as the package is unsupported on Windows.
What / Why
Executing
npm ci
ignores theos
field in package.json. This causes platform specific packages likefsevents
(macOS-only) to be installed on other platforms (Windows in this case).When
npm ci
Where
os
field specified in package.jsonHow
Current Behavior
Steps to Reproduce
npm i webpack
[email protected]
node_modules
te create a clean CI clone statenpm ci
fsevents
is downloaded, installed, and node-gyp is executed as a result.Expected Behavior
fsevents
is skipped as the package is unsupported on Windows.Who
References
The text was updated successfully, but these errors were encountered: