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
When a developer working on a Windows machines runs npm install in a repository with biome as a dependency, linux related optional biome packages are removed from the package-lock.json.
As a result, running npm ci followed by biome ci . in a Linux based CI environment fails with the following error:
Error: Cannot find module '@biomejs/cli-linux-x64/biome'
Require stack:
- /__w/playground/playground/node_modules/@biomejs/biome/bin/biome
at Function._resolveFilename (node:internal/modules/cjs/loader:1225:15)
at Function.resolve (node:internal/modules/helpers:146:19)
at Object.<anonymous> (/__w/playground/playground/node_modules/@biomejs/biome/bin/biome:51:11)
at Module._compile (node:internal/modules/cjs/loader:1554:14)
at Object..js (node:internal/modules/cjs/loader:1706:10)
at Module.load (node:internal/modules/cjs/loader:1289:[32](https://github.com/eviden-parallel/playground/actions/runs/13288940530/job/37106201809?pr=1721#step:6:33))
at Function._load (node:internal/modules/cjs/loader:1108:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/__w/playground/playground/node_modules/@biomejs/biome/bin/biome'
]
}
Expected Behavior
The package-lock should remain identical, regardless on what OS npm install is executed.
Otherwise this is creating conflicts between different OS environments.
According to Biome developers, this seems to be an NPM issue, since the problem is not reproducible with Yearn
Steps To Reproduce
Clone a repository on Windows
run npm i @biomejs/biome (in a DOS or Powershell console)
Commit the changes including the package-lock.json
Clone the repository on Linux
run npm i
run npm biome rage => The command will fail with the error below:
Error: Cannot find module '@biomejs/cli-linux-x64/biome'
Require stack:
- /__w/playground/playground/node_modules/@biomejs/biome/bin/biome
at Function._resolveFilename (node:internal/modules/cjs/loader:1225:15)
at Function.resolve (node:internal/modules/helpers:146:19)
at Object.<anonymous> (/__w/playground/playground/node_modules/@biomejs/biome/bin/biome:51:11)
at Module._compile (node:internal/modules/cjs/loader:1554:14)
at Object..js (node:internal/modules/cjs/loader:1706:10)
at Module.load (node:internal/modules/cjs/loader:1289:[32](https://github.com/eviden-parallel/playground/actions/runs/13288940530/job/37106201809?pr=1721#step:6:33))
at Function._load (node:internal/modules/cjs/loader:1108:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/__w/playground/playground/node_modules/@biomejs/biome/bin/biome'
]
}
Solving the issue on linux requires removing node_modules and package-lock.json and running npm i again.
Environment
Windows (Dev machine)
node: v22.14.0
npm: 10.9.2
OS: Windows 11 Pro 24H4 26100.3194
Model: Surface Pro 7+ with Core i7
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
When a developer working on a Windows machines runs
npm install
in a repository with biome as a dependency, linux related optional biome packages are removed from thepackage-lock.json
.As a result, running
npm ci
followed bybiome ci .
in a Linux based CI environment fails with the following error:Expected Behavior
The package-lock should remain identical, regardless on what OS
npm install
is executed.Otherwise this is creating conflicts between different OS environments.
According to Biome developers, this seems to be an NPM issue, since the problem is not reproducible with Yearn
Steps To Reproduce
npm i @biomejs/biome
(in a DOS or Powershell console)package-lock.json
npm i
npm biome rage
=> The command will fail with the error below:Solving the issue on linux requires removing
node_modules
andpackage-lock.json
and runningnpm i
again.Environment
Windows (Dev machine)
node: v22.14.0
npm: 10.9.2
OS: Windows 11 Pro 24H4 26100.3194
Model: Surface Pro 7+ with Core i7
Linux (Codespace and CI)
node: v22.14.0
npm: 10.9.2
OS: Ubuntu 24.04
Model: VM / Docker
The text was updated successfully, but these errors were encountered: