-
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
Cannot install packages from GitHub when mounting directory (node:12-slim) #1126
Comments
Trying to do npm install as root in a mounted folder caused a lot of problems. Can you check what thw permissions of your |
You can do it but it does lead to all sort of permission mismatch which makes debugging these types of issue very hard. |
I should also point out that it's especially problematic with mounted volumes from the host system. |
I've encountered the same problem when upgrading our docker-images from node 11 to 12. First I tried 12.13.0-alpine, then 12.13.0-buster-slim and 12.11.1-buster-slim, all with the same error. 12.9.1-buster-slim finally worked again, and so did 12.9.1-alpine. I've not checked versions in between, but somewhere there must be the problem. |
I have what looks like the same issue which started sometime between 12/13 and 12/27 - using node+npm from deb.nodesource.com. It didn't matter which version of node I used (still using 8 for some builds), but it starts in npm 6.11.0 (6.10.3 works fine). |
Confirming the issue. Currently using this as a workaround (thanx to @hcomnetworkers !)
(assumes that all node-gyp output will be compatible between different minor versions of the node container) |
I believe y'all are running into this issue npm/cli#624 A fix is in the latest release of npm https://github.com/npm/cli/releases/tag/v6.13.6 |
Installing npm that includes v6.13.6 solved the issue for me. Thank you! Just in case - for those who are on alpinelinux-based containers (comes with official docker image of node-red): |
Guys, I was having the same problem and maybe/probably because I am too dumb on docker I couldn't figure out how to make So, if anyone is struggling with that, simply downgrade the version of your Linux alpine image to |
chown root:root -R xxx/bin/npm or chown root:root -R /xxxx |
Thanks mate, this answer really help me ### |
When trying to install packages from GitHub using
node:12-slim
, we're seeing the following error:This first broke on the morning of the 5th October. It worked fine on the morning of the 4th October.
This only happens when we're mounting a directory - if we just mount the
package.json
, it works fine.I have not tried other node images.
To re-create, create a
package.json
in an empty directory:Create a
Dockerfile
alongside thepackage.json
:From the directory, run:
That errors when trying to create leading directories:
The debug log file shows the following:
When mounting just the
package.json
, it works fine, e.g:Let me know if you need any more information.
Thanks!
The text was updated successfully, but these errors were encountered: