Skip to content

Commit 935cb58

Browse files
authored
fix: build fails on Linux/Intel macOS due to missing native optional deps (#583)
* fix: declare platform-native optional deps so the frontend build resolves The Linux (and macOS Intel) build of the frontend web bundle failed with: Cannot find module '../lightningcss.linux-x64-gnu.node' The committed lockfile only carried native package nodes for darwin-arm64 (it was generated on Apple Silicon). On any other platform the required native binaries for lightningcss and @tailwindcss/oxide have no resolution entry in the lockfile, so npm silently skips them (they're optional), breaking the Tailwind/webpack build in npm ci and npm install alike (npm/cli#4828). Declare the needed platform binaries as direct optionalDependencies so npm records their nodes in the lockfile and installs them reliably on each matching platform. Covers the platforms this repo actually builds on: linux-x64-gnu (build_linux.sh / build_deb.sh, _build-linux.yml) and macOS arm64/x64 (build_dmg.sh, _build-dmg.yml). Their os/cpu constraints mean each installs only where it applies. Verified: a clean `npm ci` now installs the Linux natives and the frontend bundle builds end to end. * chore: add changeset for Linux/Intel macOS native deps fix
1 parent 38e08f2 commit 935cb58

3 files changed

Lines changed: 138 additions & 3 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"kiji-privacy-proxy": patch
3+
---
4+
5+
- Declared the platform-native optional dependencies so the frontend build resolves on Linux and Intel macOS, fixing builds that failed due to missing native optional deps.

package-lock.json

Lines changed: 125 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/frontend/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@
6363
"webpack-cli": "^7.0.3",
6464
"webpack-dev-server": "^5.2.5"
6565
},
66+
"optionalDependencies": {
67+
"@tailwindcss/oxide-darwin-arm64": "4.1.18",
68+
"@tailwindcss/oxide-darwin-x64": "4.1.18",
69+
"@tailwindcss/oxide-linux-x64-gnu": "4.1.18",
70+
"lightningcss-darwin-arm64": "1.30.2",
71+
"lightningcss-darwin-x64": "1.30.2",
72+
"lightningcss-linux-x64-gnu": "1.30.2"
73+
},
6674
"build": {
6775
"appId": "com.kiji.proxy",
6876
"productName": "Kiji Privacy Proxy",

0 commit comments

Comments
 (0)