Docker-node: `npm cache clean` throws with npm 5

Created on 1 Jun 2017  路  8Comments  路  Source: nodejs/docker-node

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.

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-cache for docker).

What you can do in your own dockerfile is to include --force.

All 8 comments

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/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kingjerod picture kingjerod  路  5Comments

dionysiusmarquis picture dionysiusmarquis  路  3Comments

mtibben picture mtibben  路  3Comments

tigrus picture tigrus  路  4Comments

kmleow picture kmleow  路  5Comments