[Solved-4 Solutions] Node.js / Windows error: ENOENT, stat 'C:\Users\RT\AppData\Roaming\npm'
Error Description:
- In the latest Node.js 32 bit, when we try to run the command npm install jquery, we receive the error:
Error: ENOENT, stat 'C:\Users\RT\AppData\Roaming\npm
How do we resolve it?
Solution 1:
- Manually creating a folder named 'npm' in the displayed path fixes the problem.
Solution 2:
- After creating the npm folder manually in C:\Users\UserName\AppData\Roaming\ that particular error will be gone, but it might give similar multiple errors as it tried to create additional directories in the npmfolder and failed. The issue will be resolved after running the command prompt as an administrator.
Solution 3:
- This can also be fixed by installing a node package manually.
npm install npm -g
click below button to copy the code. By - nodejs tutorial - team
- The process of doing that will setup all the required directories.
Solution 4:
- We need to set an alternative location for our npm modules.
npm config set prefix C:\Dev\npm-repository\npm --global
npm config set cache C:\Dev\npm-repository\npm-cache --global