Disable npm cache
You could fix the problem with parallel builds by creating a new directory for one series of npm commands and set its cache
to that empty directory and then remove that directory afterwards. Like:
export npm_config_cache=$(mktemp -d)
npm ...
...
rm -rf $npm_config_cache
This would remove the need for npm cache clean
as it would always start out with an empty cache.
As npm-config documented:
force§ Default: false Type: Boolean Makes various commands more forceful.
- lifecycle script failure does not block progress.
- publishing clobbers previously published versions.
- skips cache when requesting from the registry.
- prevents checks against clobbering non-npm files.
Maybe use -f
/ --force
is the simplest way to disable npm cache.
npm install --force