问题描述
npm ERR! Windows_NT 10.0.10586npm ERR! argv 'C:SoftwareProgram FilesJetBrainsWebStorm 2017.1.4nodeJsnode.exe' 'C:SoftwareProgram FilesJetBrainsWebStorm 2017.1.4nodeJsnode_modulesnpmbinnpm-cli.js' 'install' 'yarn' '-g'npm ERR! node v6.11.0npm ERR! npm v3.10.10npm ERR! path C:SoftwareProgram FilesJetBrainsWebStorm 2017.1.4nodeJsglobalyarnnpm ERR! code EISDIRnpm ERR! errno -4068npm ERR! syscall opennpm ERR! eisdir EISDIR: illegal operation on a directory, open ’C:SoftwareProgram FilesJetBrainsWebStorm 2017.1.4nodeJsglobalyarn’npm ERR! eisdir This is most likely not a problem with npm itselfnpm ERR! eisdir and is related to npm not being able to find a package.json innpm ERR! eisdir a package you are trying to install.npm ERR! Please include the following file with any support request:npm ERR! C:Windowssystem32npm-debug.log
以上是npm安装yarn时的报错日志,尝试过重新安装nodejs,使用管理权限运行cmd,都不成功。请问怎么解决?
问题解答
回答1:可能npm版本问题 ,重新安装npm 试试 试试 npm uninstall npm 然后再 npm install -g npm