-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[ERROR] Setup_16.x on Debian 12 Bookworm installs v18.13.0
#1579
Comments
The same issue. As workaround decided to use image base on Debian 11 (bullseye): php:8.1-fpm-bullseye |
Same issue with python docker image. Switched to |
You can add 'npm' after nodejs "&& apt-get install -y nodejs npm" in order to solve the problem |
No problem to install npm but I expect to install nodejs version 14 but get 18. |
I mean the other half of your problem "the setup script installs node v18.13.0 without any npm package" |
Hi guys this is an issue with the repositories configuration on your OS, I was not even able to re-produce this behavior. |
Sorry @riosje, you are right. The script is working correctly. The challenge is that Debian Bookworm provides a newer Node.js package
But as you already mentioned the solution is to pin the |
Thanks for the clarification. How can we pin RUN echo "Package: *
Pin: origin deb.nodesource.com
Pin-Priority: 1001" >> /etc/apt/preferences.d/preferences |
@gaurangblaze You could use the following Dockerfile as an example: FROM php:8.2-apache-bookworm
RUN echo 'Package: nodejs\nPin: origin deb.nodesource.com\nPin-Priority: 600' > /etc/apt/preferences.d/nodesource \
&& curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install -y nodejs
|
Hi o1y, |
Right now, it appears to me that every script with the following conditions is broken:
This seems like a fairly common situation, which is why there are already multiple comments in this thread even though Bookworm was released under two weeks ago. Note that prior to this, running the Can the |
it works for me RUN echo "Package: nodejs" >> /etc/apt/preferences.d/preferences && \
echo "Pin: origin deb.nodesource.com" >> /etc/apt/preferences.d/preferences && \
echo "Pin-Priority: 1001" >> /etc/apt/preferences.d/preferences
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install -y nodejs |
@riosje Can the |
Describe your bug
When installing node 16.x, the setup script installs node
v18.13.0
without any npm package.Distribution Information:
Node Version:
To Reproduce
Steps to reproduce the behavior:
Use this Dockerfile:
Expected behavior
Installation of node v16.x and npm package.
The text was updated successfully, but these errors were encountered: