Skip to content

fix(ci): work around npm optional deps bug in FRONTEND builds#403

Merged
Aamod-Dev merged 1 commit into
mainfrom
fix/ci-rollup-optional-deps-lockfile
Jun 22, 2026
Merged

fix(ci): work around npm optional deps bug in FRONTEND builds#403
Aamod-Dev merged 1 commit into
mainfrom
fix/ci-rollup-optional-deps-lockfile

Conversation

@Aamod-Dev

Copy link
Copy Markdown
Collaborator

Problem

CI's \�uild-and-lint\ job fails on every PR with:
\
Error: Cannot find module @rollup/rollup-linux-x64-gnu.
npm has a bug related to optional dependencies (npm/cli#4828).
\\

The \FRONTEND/package-lock.json\ was generated on Windows. When
pm ci\ runs on the Linux CI runner, it doesn't properly install cross-platform optional dependencies due to npm bug #4828.

Fix

  • Switched FRONTEND dependency install from
    pm ci\ to
    pm install\ in both CI jobs (the recommended workaround for this npm bug)
  • Added npm caching to the \e2e-tests\ job (previously missing, making installs slower)

Root + BACKEND still use
pm ci\ since they don't have this issue.

…RONTEND

npm ci fails on Linux CI runners because of npm bug #4828 where
cross-platform optional dependencies (like @rollup/rollup-linux-x64-gnu)
are not installed correctly from a lockfile generated on Windows.

Switching to npm install for FRONTEND dependencies in both CI jobs
avoids this issue while the lockfile can be regenerated natively.
Also adds npm caching to the e2e-tests job for faster installs.
@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
product-store Error Error Jun 22, 2026 2:02pm

@Aamod-Dev Aamod-Dev merged commit a3d79cc into main Jun 22, 2026
2 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant