fix(sync): move typescript to dependencies to fix Docker build
npm silently skips devDependencies in some Alpine+npm combinations, causing tsc to be missing even after npm install. Moving typescript to regular dependencies guarantees it is always installed and its .bin symlink is created regardless of NODE_ENV. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@ COPY package*.json .npmrc ./
|
|||||||
RUN npm install
|
RUN npm install
|
||||||
COPY tsconfig.json ./
|
COPY tsconfig.json ./
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
RUN ./node_modules/.bin/tsc && npm prune --production
|
RUN npm run build && npm prune --production
|
||||||
|
|
||||||
# Stage 2: runtime with Playwright
|
# Stage 2: runtime with Playwright
|
||||||
FROM mcr.microsoft.com/playwright:v1.47.0-jammy
|
FROM mcr.microsoft.com/playwright:v1.47.0-jammy
|
||||||
|
|||||||
7
sync/package-lock.json
generated
7
sync/package-lock.json
generated
@@ -10,13 +10,13 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@playwright/test": "^1.47.0",
|
"@playwright/test": "^1.47.0",
|
||||||
"dotenv": "^16.0.0",
|
"dotenv": "^16.0.0",
|
||||||
"pg": "^8.11.0"
|
"pg": "^8.11.0",
|
||||||
|
"typescript": "^5.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^20.0.0",
|
"@types/node": "^20.0.0",
|
||||||
"@types/pg": "^8.10.0",
|
"@types/pg": "^8.10.0",
|
||||||
"ts-node": "^10.9.0",
|
"ts-node": "^10.9.0"
|
||||||
"typescript": "^5.0.0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@cspotcode/source-map-support": {
|
"node_modules/@cspotcode/source-map-support": {
|
||||||
@@ -406,7 +406,6 @@
|
|||||||
"version": "5.9.3",
|
"version": "5.9.3",
|
||||||
"resolved": "https://npm.apple.com/typescript/-/typescript-5.9.3.tgz",
|
"resolved": "https://npm.apple.com/typescript/-/typescript-5.9.3.tgz",
|
||||||
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
||||||
"dev": true,
|
|
||||||
"peer": true,
|
"peer": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
|
|||||||
@@ -11,12 +11,12 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@playwright/test": "^1.47.0",
|
"@playwright/test": "^1.47.0",
|
||||||
"pg": "^8.11.0",
|
"pg": "^8.11.0",
|
||||||
"dotenv": "^16.0.0"
|
"dotenv": "^16.0.0",
|
||||||
|
"typescript": "^5.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^20.0.0",
|
"@types/node": "^20.0.0",
|
||||||
"@types/pg": "^8.10.0",
|
"@types/pg": "^8.10.0",
|
||||||
"ts-node": "^10.9.0",
|
"ts-node": "^10.9.0"
|
||||||
"typescript": "^5.0.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user