Your team might be already aware of this issue, but since I have this issue for more than 1 week now, and I still can’t found any related open topic about it, npm install -g npm@latest fails with the following error:
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/npm
npm ERR! dest /usr/local/lib/node_modules/.npm-i9nnxROI
npm ERR! errno -18
npm ERR! EXDEV: cross-device link not permitted, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-10-30T06_46_38_644Z-debug.log
Exited with code exit status 238
CircleCI received exit code 238
I’m using the node:current Docker image and install the latest npm version before installing/running tests/linters/etc…
I believe it’s a (recurring) npmissue but I’m a bit suprised that nothing have been said about it here by the CircleCI team or users (except us) since more than 1 month. Also see these both StackOverflow questions:
Not using it locally. Just checked and it’s still running in to the same issue. Any chance we’ll get a workaround here or are we left to our own devices?
As noted in the Github issue on the npm repository linked in my previous comment, and as hinted by a recent push to one of my Github repository, successfully passing CircleCI tests, npm fixed this bug in v7.4.2.