As much as I love Npm, it can be quite buggy at times, especially on Windows.
One such error I encountered recently was trying to install the latest version of the Aurelia CLI by typing npm install -g aurelia-cli
in most cases this just works and updates the existing version. However, a couple of times now, I kept getting some error about “ENOENT: no such file or directory, rename” and then something about a node_modules/.staging
folder.
The fix is:
- Uninstall the dependency:
npm uninstall -g aurelia-cli
- Clear your Npm cache:
npm cache clean
- Then reinstall:
npm install -g aurelia-cli
Check out my new aurelia-installer CLI as well and let me know what you think, tips for improvements etc. 😉 Cheer!
https://www.npmjs.com/package/aurelia-installer