I often had such problems with npm and after I switched to yarn I got rid of this, I suggest you consider this.