-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using node LTS leads to error during docker run #2095
Comments
|
This message is from yarn 1.22.20 and later:
It looks like the Docker images for Node.js 20 include yarn 1.22.22 while the image for Node.js 18 includes an older yarn 1.22.19 (i.e. before the behaviour was changed). I'll move this issue to https://github.com/nodejs/docker-node. |
This error message is by design, it tells you that the package file is from a newer version of yarn. You would need to update yarn in your image. |
Version
v20.14.0
Platform
macOS
Subsystem
No response
What steps will reproduce the bug?
Dockerfile:
FROM node:lts as base
...
RUN yarn install --immutable --immutable-cache
...
RUN yarn build
...
CMD yarn start
repro steps:
docker build -t test-image .
and image should be built without errordocker run -p 3000:3000 test-image
and it leads to errorHow often does it reproduce? Is there a required condition?
It is 100% reproducible with node v20.14.0 (latest LTS). After pinned node version to 18.20.3, the issue is gone.
I've tried lower version of node 20 like 20.9.0 and it has the same issue.
What is the expected behavior? Why is that the expected behavior?
The docker run command should not error out.
What do you see instead?
running command
docker run -p 3000:3000 test-image
leads to error:Additional information
No response
The text was updated successfully, but these errors were encountered: