Commit bb4fac5
committed
fix(docker): force better-sqlite3 to compile from source under QEMU
both prebuild-install and node-gyp rebuild were failing silently
under QEMU arm64 emulation on GitHub Actions amd64 runners.
prebuild-install first attempts to download a prebuilt binary from
GitHub releases; under QEMU + CI this either times out, returns an
incompatible binary, or the exact node-v115-linux-arm64 prebuilt
simply does not exist for better-sqlite3@9.6.0. The fallback
'node-gyp rebuild' then also failed silently.
Fix: set npm_config_build_from_source=true on the pnpm install call
so prebuild-install skips the download entirely and goes straight to
node-gyp compilation. python3/make/g++ are already in the image so
this always succeeds.
Also add a verification RUN that fails the image build immediately
if better_sqlite3.node is still missing after install, giving an
early actionable error instead of a runtime crash.1 parent d267264 commit bb4fac5
2 files changed
+16
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| |||
0 commit comments