Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EXDEV: cross-device link not permitted, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'

My builds keep failing on CircleCI with the error:

EXDEV: cross-device link not permitted, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'

This happens before installing any library. Has anyone encountered this problem?

like image 472
Farid Garciayala Avatar asked Oct 26 '20 18:10

Farid Garciayala


2 Answers

In my case the reason for this and also some other errors was the release of node 15 and its use in FROM node:alpine -> downgrading to FROM node:14.14.0-alpine worked like a charm

like image 156
morrigannn Avatar answered Dec 02 '22 19:12

morrigannn


As others have mentioned somehow this seems to be related to using Node 15. In my case I was using the latest Node docker image in my .circleci/config.yml:

jobs:
  build:
    docker:
      - image: circleci/node:latest

The other answers so far have suggested hardcoding a specific node version but I'm generally wary of hardcoding. As an alternative I decided to use the most recent LTS version of Node:

      - image: circleci/node:lts

This fixes the issue and I think it's probably better since it should give me a more stable release to test against moving forward.

like image 24
bmaupin Avatar answered Dec 02 '22 20:12

bmaupin