node.js and npm for windows

2019-01-29 12:10发布

问题:

I am trying to get node.js and npm working on a windows computer (It works perfectly fine for me on mac ox and ubuntu). The installation completed without any errors but when I try to install anything with npm I get the following error:

Example:

npm install express
Error: ENOENT, stat 'C:\Users\siva.sivakumaran\AppData\Roaming\npm'

Can someone help me out with this issue?

回答1:

I added the folder npm under AppData/Roaming and it worked for me.



回答2:

I was having the same issue and I solved it with:

npm cache clean

Best.