运行npm install -g yo命令给出 – >“npm ERR! Windows_NT 6.1.7601“

npm -v:3.5.3

我是非常新的npm,当我运行npm install -g哟,得到像这样的错误:

npm ERR! Windows_NT 6.1.7601 

npm ERR! argv“C:\ Program Files \ nodejs \ node.exe”“C:\ Users \ sougata.a \ AppDa ta \ Roaming \ npm \ node_modules \ npm \ bin \ npm-cli.js”“install”“-g” “哟”npm ERR! 节点v5.5.0 npm ERR! npm v3.5.3 npm ERR! pathC:\ Program Files \ nodejs \ node_modules.staging npm ERR! 代码EPERM npm ERR! errno -4048 npm ERR! 系统调用mkdir npm ERR! 错误:EPERM:操作不允许,mkdir'C:\ Program Files \ nodejs \ n ode_modules.staging'npm ERR! 在错误(本机)npm ERR! {[Error:EPERM:operation not permitted,mkdir'C:\ Program Files \ node js \ node_modules.staging'] npm ERR! errno:-4048,npm ERR! 代码:'EPERM',npm ERR! 系统调用:'mkdir',npm ERR! path:'C:\ Program Files \ nodejs \ node_modules \ .staging'} npm ERR! npm ERR! 请尝试以root / Administrator身份再次运行此命令。

我没有和代理设置,我禁用防火墙和防病毒。 如果我运行npmcaching干净相同的错误即将到来!

谁能帮我???

这是我如何解决Windows 8.1上的问题

  • 转到您的nodejs安装(通常是C:\ Program Files \ nodejs)
  • 右键单击node_modules文件夹并转到属性
  • 单击安全选项卡并高级
  • 在顶部你会看到“所有者:系统”。 点击更改。
  • input你想要的权限,点击确定
  • 选中高级设置底部的checkbox“将所有子对象权限条目replace为来自此对象的可inheritance权限条目”,然后单击确定
  • 做任何你需要的npm安装/更新

你使用代理吗? 你有没有发现这些条目似乎是与其他模块相同的问题。 https://github.com/npm/npm/issues/8048

我有类似的错误

npm ERR! Windows_NT 6.1.7601 …我不得不closures我的防火墙和AntiVir

在这里也是这个https://forums.tessel.io/t/error-using-npm-install-on-windows/212有很多解决这个问题的东西到目前为止你试过了什么?

但似乎npm安装到的目录不在你的path上。

你试过这个东西吗?

当我在Windows上完成时,我必须启动'node command shell'或任何它的名字。 基本上,如果您使用的是Windows 8,并且search“节点”,则应该看到一个configuration为运行节点的命令shell程序。 它有标准的'CMD'看黑色的terminal图标。

不要与具有node.js徽标的“节点shell”混淆。 那是一个交互式REPL节点,这不是你想要的。

命令shell已经安装了正确的path。 如果只运行常规命令shell或PowerShell,则不会configurationpath,除非您自己进入系统并进行configuration。

你是新来的节点还是刚刚发生的这个错误? 也许你应该添加你的包json