The recent updates may be causing issues
- Platform: Windows (amd64)
- Docker Version: Desktop 4.34.3 (161083) or 4.4.4
- Node.js Version: 22.10.0
- Image Tag: node:22-alpine or node:22.10.0-alpine3.20 or any other updated in the last few hours
I’ve been having trouble building my projects using the latest Docker images for Node.js. The recent updates seem to be causing issues—I can only successfully build with images from earlier dates. Previously, I relied on node:22-alpine, but after the most recent update, it’s no longer working for me. Any insights or fixes?
'npm ci' get stuck like this:
=> [builder 4/6] RUN npm ci --verbose 616.5s
=> => # npm info using [email protected]
=> => # npm info using [email protected]
=> => # npm verbose title npm ci
=> => # npm verbose argv "ci" "--loglevel" "verbose"
=> => # npm verbose logfile logs-max:10 dir:/home/node/.npm/_logs/2024-10-18T06_09_00_687Z-
=> => # npm verbose logfile /home/node/.npm/_logs/2024-10-18T06_09_00_687Z-debug-0.log
When I try node:lts-alpine3.20 it works as always worked on node:22-alpine.
P.S. After trying a million alternatives, what magically resolved for me was swapping npm for yarn.
I'm getting this as well, it seems to work on image tag node:22.9-alpine
I'm getting this as well, it seems to work on image tag
node:22.9-alpine
yes the issue started with node: 22.10.0
I can`t do an npm install anymore
switching back to node:22.9.0-alpine solved it.
made a dummy repo that replicates this problem here
Still seems present in v22.11.0 - the following hangs for 10 mins+ (until cancelling).
npm verbose cli /usr/local/bin/node /usr/local/bin/npm
npm info using [email protected]
npm info using [email protected]
npm verbose title npm ci
npm verbose argv "ci" "--loglevel" "verbose"
npm verbose logfile logs-max:10 dir:/root/.npm/_logs/2024-10-31T20_59_05_818Z-
npm verbose logfile /root/.npm/_logs/2024-10-31T20_59_05_818Z-debug-0.log
As per https://github.com/nodejs/docker-node/issues/2153#issuecomment-2422380608 switching from FROM node:lts AS development to FROM node:22.9.0-alpine AS development resolves the issue.
i'm building my image with node:lts-bullseye-slim and for some reason running RUN npm config set loglevel verbose before RUN npm ci --legacy-peer-deps fixed it for me.
i'm building my image with
node:lts-bullseye-slimand for some reason runningRUN npm config set loglevel verbosebeforeRUN npm ci --legacy-peer-depsfixed it for me.
Yup setting loglevel like that fixes my issues running docker on one of my Windows machines. Starting from node:22.10.0
My CI builds started getting stuck when running npm install using node:latest. Moving back to node:22.9.0 solved the issue for me.
I also noticed that under node:latest, I started getting this new warning right after running npm install that I don't get with node:22.9.0:
(node:518) ExperimentalWarning: CommonJS module /usr/local/lib/node_modules/npm/node_modules/debug/src/node.js is loading ES Module /usr/local/lib/node_modules/npm/node_modules/supports-color/index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
There seem to be several different reports around NPM issues here. This repo only ships the version of NPM that is bunlded with the version of Node.js, so no change in this repo will help you. Take a look at the upstream repos for NPM or Node.js.