Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js/Windows error: ENOENT, stat 'C:\Users\RT\AppData\Roaming\npm'

I have Windows 7 32-bit. I installed the latest Node.js 32 bit.
When I try to run the command npm install jquery, I receive the error:

Error: ENOENT, stat 'C:\Users\RT\AppData\Roaming\npm

How does one resolve it?

like image 561
tryasko Avatar asked Aug 02 '14 08:08

tryasko


People also ask

What is Appdata roaming NPM?

appdata/Roaming was made for data to roam with the user. Concrete example of this: If user A logs into machine A and npm installs, then the cache will be stored in appdata/roaming on machine A.


2 Answers

Manually creating a folder named 'npm' in the displayed path fixed the problem.

More information can be found on Troubleshooting page

like image 104
Torsten Avatar answered Oct 17 '22 01:10

Torsten


I ran into the same problem while installing a package via npm.

After creating the npm folder manually in C:\Users\UserName\AppData\Roaming\ that particular error was gone, but it gave similar multiple errors as it tried to create additional directories in the npm folder and failed. The issue was resolved after running the command prompt as an administrator.

like image 107
Aniket Thakur Avatar answered Oct 17 '22 00:10

Aniket Thakur