Build fails while installing npm v7


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…