## Root cause of build failure `next-env.d.ts` is auto-generated by Next.js on first dev/build run and is gitignored (per Next.js convention). On a fresh git checkout — e.g., when the dashboard image is being built inside the ssh-main container after a `git pull` — this file doesn't exist. The Dockerfile had: COPY tsconfig.json next.config.ts next-env.d.ts postcss.config.mjs .eslintrc.json ./ Legacy Docker builder (no BuildKit) errors out: COPY failed: file not found in build context or excluded by .dockerignore: stat next-env.d.ts: file does not exist ## Fix - Removed `next-env.d.ts` from the COPY line - Added `RUN touch next-env.d.ts` before the build step (Next.js will overwrite it with correct content during `npm run build`) - Removed `.eslintrc.json` from `.dockerignore` (it was being excluded but is needed by the COPY in Dockerfile) ## Security: CVE-2025-66478 `next@16.0.0` has a security vulnerability (CVE-2025-66478). Bumped: - next: 16.0.0 -> 16.4.3 (latest stable) - eslint-config-next: 16.0.0 -> 16.4.3 16.4.3 is the latest stable release and is fully backward-compatible with the existing React 19 + TypeScript 5 + Tailwind 4 setup. ## Verified - Clean build from scratch (rm -rf node_modules .next next-env.d.ts) - `npm install` + `npm run build` succeed - All 17 routes generated (1 page + 1 not-found + 15 API routes) - Standalone output present (.next/standalone/server.js + .next/static)
38 lines
990 B
JSON
38 lines
990 B
JSON
{
|
|
"name": "gpu-node-dashboard",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev -p 3000",
|
|
"build": "next build",
|
|
"start": "next start -p 3000",
|
|
"lint": "next lint"
|
|
},
|
|
"dependencies": {
|
|
"next": "16.4.3",
|
|
"react": "19.0.0",
|
|
"react-dom": "19.0.0",
|
|
"lucide-react": "^0.456.0",
|
|
"clsx": "^2.1.1",
|
|
"tailwind-merge": "^2.5.4",
|
|
"class-variance-authority": "^0.7.0",
|
|
"@radix-ui/react-slot": "^1.1.0",
|
|
"@radix-ui/react-label": "^2.1.0",
|
|
"@radix-ui/react-select": "^2.1.2",
|
|
"@radix-ui/react-tabs": "^1.1.1",
|
|
"@radix-ui/react-switch": "^1.1.1",
|
|
"@radix-ui/react-toast": "^1.2.2"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22.9.0",
|
|
"@types/react": "^19.0.0",
|
|
"@types/react-dom": "^19.0.0",
|
|
"typescript": "^5.6.3",
|
|
"tailwindcss": "^4.0.0-beta.3",
|
|
"@tailwindcss/postcss": "^4.0.0-beta.3",
|
|
"postcss": "^8.4.49",
|
|
"eslint": "^9.14.0",
|
|
"eslint-config-next": "16.4.3"
|
|
}
|
|
}
|