js/core: On npm failures clean the npm cache and try again.
We probably should figure out why the cache is getting corrupted, but
this quick fix takes care the problem.
Change-Id: Ic5232128beb388b81a7d84f418611b721c56390b
diff --git a/Makefile b/Makefile
index b15a55e..3dbd24f 100644
--- a/Makefile
+++ b/Makefile
@@ -316,7 +316,7 @@
node_modules: package.json check-that-npm-is-in-path
ifndef NONPMUPDATE
@npm prune
- @npm install --quiet
+ @npm install --quiet || (rm -fr $(HOME)/.npm && npm install --quiet)
@touch node_modules
endif