Some time ago I had trouble with the npm cache on our build machines. From time to time we had to do npm cache clean
by hand, and that solved various issues that we
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.