This line should be changed because the following error is thrown:
npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead.
npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force.
I am running into this issue as well. Please fix.
I confirm this issue with 8.0.0-onbuild docker image.
please dont remove the cache clean comand and instead force clean
The fix should be available after https://github.com/docker-library/official-images/pull/3039 is merged.
Why is this closed ? It still throws if you try to clear the cache, which is a good practice in docker containers. To be honest, I don't see this as a reasonable approach, a warning will be more than enough.
You need to report that to npm, there is nothing we can do about it (though I agree - I'd prefer a npm install --no-cache for docker).
What you can do in your own dockerfile is to include --force.
Hello @SimenB
That is what I'm doing . I reported it here because this repository seems to be part of the node family, and I thought the same people than the rest of more things may rule it
Regards
npm is not a part of the node organization 馃檪
I think your idea about just warning, and not failing, on clearing the cache in npm 5 makes sense, but that request belongs here: https://github.com/npm/npm/
Most helpful comment
You need to report that to npm, there is nothing we can do about it (though I agree - I'd prefer a
npm install --no-cachefor docker).What you can do in your own dockerfile is to include
--force.