Skip to content

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

Closed

Description

@chrisspen

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.

Activity

  1. mhart commented on Oct 20, 2020

    @mhart
    Contributor

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

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

  2. mhart commented on Oct 20, 2020

    @mhart
    Contributor

    Reproduction:

    docker run --rm mhart/alpine-node:15 npm install -g npm@7
    
  3. ttshivers commented on Oct 25, 2020

    @ttshivers

    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")

  4. added
    Bug
    on Oct 30, 2020
  5. added a commit that references this issue on Nov 6, 2020
    0e58e6f
  6. added this to the OSS - Sprint 19 milestone on Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions