fix: upgrade npm in Docker builder to fix Invalid Version error

npm 11 (used locally, Node 25) generates package-lock.json entries for
  optional platform packages without a 'version' field. npm 10.8.2 bundled
  in node:20-alpine rejects these with 'Invalid Version:' during npm ci.

  Upgrade npm to latest inside the builder stage before running npm ci.

  Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Matthias Hochmeister
2026-02-26 15:37:00 +01:00
parent c8cd1e3207
commit 971ce3850c

View File

@@ -12,6 +12,7 @@ COPY package*.json .npmrc ./
# Install dependencies (NODE_ENV must not be production so devDependencies are installed)
ENV NODE_ENV=development
ENV PATH="/app/node_modules/.bin:$PATH"
RUN npm install -g npm@latest
RUN npm ci --include=dev
# Copy source code