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 are still not certain about what caused them. So after a time we included npm cache clean in all our build scripts, since then we did not have mysterious problems with npm i, however now parallel builds obviously affect each other.
For me the best solution seems to be completely turn off the npm caching mechanism, but I couldn't find out how to do that.