npm 安装报错 errno -4068

新手上路,请多包涵

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Software\\Program Files\\JetBrains\\WebStorm 2017.1.4\\nodeJs\\node.exe" "C:\\Software\\Program Files\\JetBrains\\WebStorm 2017.1.4\\nodeJs\\node_modules\\npm\\bin\\npm-cli.js" "install" "yarn" "-g"
npm ERR! node v6.11.0
npm ERR! npm  v3.10.10
npm ERR! path C:\Software\Program Files\JetBrains\WebStorm 2017.1.4\nodeJs\global\yarn
npm ERR! code EISDIR
npm ERR! errno -4068
npm ERR! syscall open

npm ERR! eisdir EISDIR: illegal operation on a directory, open 'C:\Software\Program Files\JetBrains\WebStorm 2017.1.4\nodeJs\global\yarn'
npm ERR! eisdir This is most likely not a problem with npm itself
npm ERR! eisdir and is related to npm not being able to find a package.json in
npm ERR! eisdir a package you are trying to install.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Windows\system32\npm-debug.log

以上是npm安装yarn时的报错日志,尝试过重新安装nodejs,使用管理权限运行cmd,都不成功。请问怎么解决?

阅读 7.4k
1 个回答

可能npm版本问题 ,重新安装npm 试试
试试 npm uninstall npm
然后再 npm install -g npm

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题