csdnceshi51
旧行李
采纳率100%
2014-08-02 08:45

错误: 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?

转载于:https://stackoverflow.com/questions/25093276/node-js-windows-error-enoent-stat-c-users-rt-appdata-roaming-npm

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

7条回答

  • csdnceshi70 笑故挽风 7年前

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

    More information can be found on Troubleshooting page

    点赞 22 评论 复制链接分享
  • csdnceshi70 笑故挽风 7年前

    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.

    点赞 25 评论 复制链接分享
  • weixin_41568174 from.. 7年前

    You can go to the Start Menu and search the Node.js icon and open the shell and then install anything with

    install <packagename> -g
    
    点赞 8 评论 复制链接分享
  • csdnceshi61 derek5. 7年前

    This can also be fixed by installing a node package manually.

    npm install npm -g
    

    The process of doing that will setup all the required directories.

    点赞 8 评论 复制链接分享
  • csdnceshi52 妄徒之命 6年前

    I recommend setting an alternative location for your npm modules.

    npm config set prefix C:\Dev\npm-repository\npm --global 
    npm config set cache C:\Dev\npm-repository\npm-cache --global  
    

    Of course you can set the location to wherever best suits.

    This has worked well for me and gets around any permissions issues that you may encounter.

    点赞 4 评论 复制链接分享
  • csdnceshi52 妄徒之命 5年前

    I needed a package from github that was written in typscript. I did a git pull of the most recent version from the master branch into the root of my main project. I then went into the directory and did an npm install so that the gulp commands would work that generates ES5 modules. Anyway, to make the long story short, my build process was trying to build files from this new folder so I had to move it out of my root. This was causing these same errors.

    点赞 评论 复制链接分享
  • csdnceshi69 YaoRaoLov 7年前

    Install a stable version instead of the latest one, I have downgrade my version to node-v0.10.29-x86.msi from 'node-v0.10.33-x86.msi' and it is working well for me!

    http://blog.nodejs.org/2014/06/16/node-v0-10-29-stable/

    点赞 评论 复制链接分享