NPM: Troubleshooting

Generally if you have an npm problem, you should find it can be resolved by one of these 10 steps:

  1. running npm install (aka npm i)
  2. running npm clean-install (aka npm ci)
  3. clearing the cache - e.g. npm cache clean -force, and then npm ci
  4. removing the offending subfolder under node_modules, and then npm ci
  5. deleting the package-lock.json file, and then npm ci
  6. deleting the entire node_modules folder, and then npm ci
  7. setting fire to your laptop, gasoline (petrol) is helpful here
  8. torching your city, any aerial bombardment via conventional missiles should be sufficient
  9. nuking the planet from orbit, nuclear fusion being strongly preferred no fissile weapons
  10. finding and killing God. His address is Unit 1, First Avenue, Heaven. Weapons from the Marvel Cinematic Universe can be employed for the purpose.

A significant number of npm problems, I should warn you, are quite a bit more stubborn than this.