Repository navigation
Closed
Labels
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
Most likely related to #4828
Tried with:
None is updating package-lock with platform specific dependencies.
Can't do update on local machine because my laptop is arm64 darwin, have to run a x86_64 VM or drop package-lock on CI.
Here is log from one of my CI runs.
Error: Cannot find module @rollup/rollup-linux-x64-gnu. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
at requireWithFriendlyError (/home/runner/work/***/rollup/dist/native.js:64:9)
at Object.<anonymous> (/home/runner/work/***/node_modules/rollup/dist/native.js:73:76)
at Module._compile (node:internal/modules/cjs/loader:1562:14)
at Object..js (node:internal/modules/cjs/loader:1699:10)
at Module.load (node:internal/modules/cjs/loader:1313:32)
at Function._load (node:internal/modules/cjs/loader:1123:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
at cjsLoader (node:internal/modules/esm/translators:263:5)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:1[96](https://github.com/***/actions/runs/15192969231/job/42730156384#step:7:97):7)
npm error Lifecycle script `build` failed with error:
npm error code 1
npm error path /home/runner/work/***/extensions/preview
npm error workspace [email protected]
npm error location /home/runner/work/***/extensions/preview
npm error command failed
npm error command sh -c vite build
Expected Behavior
package-lock successfully updated with platform specific dependencies when npm ci or npm install runs in CI environment.
Steps To Reproduce
- App with "vite@^5.3.4" +
package-lock.jsongenerated on arm64. - Build app in CI environment like github actions
Environment
- [email protected] and [email protected]
- [email protected] and [email protected]
- OS Name: local: macOS / CI: [email protected]
- System Model Name:
- npm config:
//npm.pkg.github.com/:_authToken = (protected)
//registry.npmjs.org/:_authToken = (protected)
auto-install-peers = true
enable-pre-post-scripts = true
engine-strict = true
shamefully-hoist = trueReacted by Hafez
Activity
v-kchindam-infy commentedon May 23, 2025
Hi @kusyka911 this looks to be similar if not a duplicate of an existing issue #7961, #7543, #7750 you believe your instance is unique, please provide further clarifying details.
kusyka911 commentedon May 27, 2025
@kchindam-infy Sorry, it's probably my mistake. I've just made fresh installation of all dependencies with [email protected] and it looks like everything is good for now.
fix(ci): properly handle rollup platform deps + remove LLM artifacts
https://github.com/npm/cli/issues/8320
fix: add esbuild platform packages to fix CI installation
chore(deps): downgrade Vite to v7 to fix lockfile install on CI
ci: install UI deps with npm install in the e2e job
fix(ci): upgrade npm in CI to fix EBADPLATFORM on esbuild optional deps
fix(ci): cross-platform worker lock + supported Node range pinned (ro…
Refresh the untracked transitive dependency graph and patch gRPC-Go t…
Retry a throttled GHCR token exchange instead of failing the image pi…
build: repair the lockfile, and gate the class of fault that hid it
chore(версии): весь набор на свежее — TypeScript 7, Node 26, замок ве…
build: package the hooks per platform, smoke them on four platforms, …