mirror of
https://github.com/vas3k/TaxHacker.git
synced 2026-07-03 10:52:28 +08:00
The GHCR Docker build was failing on `npm ci` because package-lock.json was out of sync with package.json (the lock was generated with npm 11 / Node 24, while the build image node:23-slim ships npm 10.9, which rejects the inconsistent optional-dependency entries for esbuild/webpack/picomatch). Regenerating the lock with npm 10.9 unmasked two further pre-existing build failures, both caused by `next build` running under the Dockerfile's NODE_ENV=production (which makes `npm ci` omit devDependencies): - @types/imap and @types/mailparser were in devDependencies, so they were absent during the production build and the type-check failed on the mailparser/imap-simple imports. Moved them to dependencies, matching the existing convention already used for @types/mime-types and @types/sharp. - vitest.config.ts and the *.test.ts files import the vitest devDependency, which next build type-checked and could not resolve. Excluded them from tsconfig so the production build does not type-check test files. Verified by building the image end-to-end (linux/amd64) with node:23-slim: npm ci, npm run build, and image export all succeed.
2.5 KiB
2.5 KiB