CI runs on Linux (GitHub Actions ubuntu-latest). Several dependencies use optional, platform-specific native bindings (e.g. @parcel/watcher, @next/swc-linux-x64-gnu, next-intl’s @swc/core). If package-lock.json is generated on macOS, it may not include the Linux optional deps, and CI can fail when running npm ci --include=optional.
To keep the lockfile correct for CI, generate or refresh it under Linux.
- After adding or updating dependencies (e.g.
npm install <pkg>, or editingpackage.jsonby hand). Run the script, then commit the updatedpackage-lock.json. - When bumping version – The bump-version script runs the Linux lockfile step automatically before committing, so you don’t need to run it yourself for version bumps.
From the repo root (requires Docker):
./scripts/development/update-lockfile-linux.shThis runs npm install --include=optional inside a Node 24 Linux x64 container and writes
the resulting package-lock.json into the repo. Forcing Linux x64 keeps optional native
dependency resolution aligned with GitHub Actions runners. Commit the updated lockfile so CI
and Docker builds use it.
- AGENTS.md – Dependencies and Linux-canonical lockfile note
- Quick Start – Local setup