Skip to content
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

[BUG] EXDEV: cross-device link not permitted, rename #606

Closed
chrisspen opened this issue Dec 16, 2019 · 3 comments
Closed

[BUG] EXDEV: cross-device link not permitted, rename #606

chrisspen opened this issue Dec 16, 2019 · 3 comments
Labels
Bug thing that needs fixing

Comments

@chrisspen
Copy link

What / Why

Attempting to install npm packages in Docker results in an error like:

npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "-g" "install" "yuglify"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! path /usr/local/lib/node_modules/yuglify
npm ERR! EXDEV: cross-device link not permitted, rename '/usr/local/lib/node_modules/yuglify' -> '/usr/local/lib/node_modules/.yuglify.DELETE'

How

My Dockerfile looks like:

FROM ubuntu:18.04
ENV PYTHONUNBUFFERED 1
USER root
RUN apt-get -yq update && apt-get install -yq npm
CMD npm -g install yuglify

Strangely, if I run the npm install command twice, the second call works.

@mhart
Copy link
Contributor

mhart commented Oct 20, 2020

Seeing this surface again with v7 on docker images (v7.0.3)

Seems it's a regression of npm/npm#15901

@mhart
Copy link
Contributor

mhart commented Oct 20, 2020

Reproduction:

docker run --rm mhart/alpine-node:15 npm install -g npm@7

mhart added a commit to mhart/alpine-node that referenced this issue Oct 20, 2020
@ttshivers
Copy link

In npm 7, "the entire Installer class is moved into @npmcli/arborist.": https://github.com/npm/cli/blob/latest/CHANGELOG.md#v700-beta0-2020-08-04

I believe the issue might be in there. It appears that it tries to rename instead of move now: https://github.com/npm/arborist/blob/main/lib/arborist/reify.js#L254

Which looks like a regression of that old PR you linked: npm/npm#15901
That PR replaced all renames with moves ("install: Use EXDEV aware move instead of rename")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants