You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have an old project that used Dockerfile to build an image, but encountered an error during the installation of PNPM. However, I am unable to identify any issues.
FROM node:12.22.12-bullseye-slim
WORKDIR /work
RUN npm install -g [email protected]COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile --prefer-offline --shamefully-hoist
COPY . .
RUN pnpm build:prod
But got error
> [linux/amd64 builder 4/8] RUN npm install -g [email protected]:
0.932 npm ERR! Cannot read property 'startsWith' of null
0.935
0.935 npm ERR! A complete log of this run can be found in:
0.935 npm ERR! /root/.npm/_logs/2025-10-15T07_30_01_836Z-debug.log
------
Dockerfile:3
--------------------
2 | WORKDIR /work
3 | >>> RUN npm install -g [email protected]
4 | COPY package.json pnpm-lock.yaml ./
5 | RUN pnpm install --frozen-lockfile --prefer-offline --shamefully-hoist
--------------------
ERROR: failed to solve: process "/bin/sh -c npm install -g [email protected]" did not complete successfully: exit code: 1
::error::buildx failed with: ERROR: failed to solve: process "/bin/sh -c npm install -g [email protected]" did not complete successfully: exit code: 1
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
We have an old project that used Dockerfile to build an image, but encountered an error during the installation of PNPM. However, I am unable to identify any issues.
But got error
Beta Was this translation helpful? Give feedback.
All reactions