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?
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With