Fix Docker builds by installing deps without strict lockfile platform mismatches.
Windows-generated locks can omit Linux optional packages; npm install keeps the image buildable. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+2
-1
@@ -6,7 +6,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends openssl ca-cert
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
COPY package.json package-lock.json ./
|
||||
COPY prisma ./prisma
|
||||
RUN npm ci
|
||||
# Use npm install (not ci): lockfiles generated on Windows can omit Linux-only optional packages (@emnapi/*).
|
||||
RUN npm install
|
||||
|
||||
FROM node:22-bookworm-slim AS builder
|
||||
WORKDIR /app
|
||||
|
||||
Generated
+6
-1
@@ -9,6 +9,8 @@
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"@auth/prisma-adapter": "^2.7.4",
|
||||
"@emnapi/core": "1.11.2",
|
||||
"@emnapi/runtime": "1.11.2",
|
||||
"@prisma/client": "^6.1.0",
|
||||
"@tailwindcss/typography": "^0.5.20",
|
||||
"bullmq": "^5.34.5",
|
||||
@@ -33,6 +35,10 @@
|
||||
"tailwindcss": "^3.4.17",
|
||||
"tsx": "^4.19.2",
|
||||
"typescript": "^5.7.2"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@emnapi/core": "1.11.2",
|
||||
"@emnapi/runtime": "1.11.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@alloc/quick-lru": {
|
||||
@@ -144,7 +150,6 @@
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz",
|
||||
"integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -48,5 +48,9 @@
|
||||
"@auth/core": "^0.41.3",
|
||||
"brace-expansion": "^5.0.8",
|
||||
"glob": "^11.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@emnapi/core": "1.11.2",
|
||||
"@emnapi/runtime": "1.11.2"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user