When installing some git dependencies using the Docker image node:10-alpine via npm ci, attempts to npm prune --production result in an error like:
npm ERR! code 128
npm ERR! Command failed: git clone --mirror -q https://github.com/nodecraft/ampify.git /root/.npm/_cacache/tmp/git-clone-6573274f/.git
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-6573274f/.git'
To help replicate the issue, I have a directory that contains a package.json and package-lock.json. I then have a Dockerfile which when building, illustrates the issue.
I've created a repository at https://github.com/Cherry/npm-prune-ci-bug detailing this, including commands to run to replicate the issue.
Last known working version: 6.10.3. This issue does not occur if I use npm version 6.10.3 or earlier.
Tested versions that throw the above error:
6.11.0
6.11.1
6.11.2
6.11.3
6.12.1
6.13.1
It appears this regression was introduced in 6.11.0, and exists through to the latest version.
If I can provide any further information, please let me know.