如何解决npm更新错误?我以root身份运行
# npm install npm@latest -g
usr/lib
└── (empty)
npm ERR! Linux 4.10.14-200.fc25.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "npm@latest" "-g"
npm ERR! node v6.10.2
npm ERR! npm v3.10.10
npm ERR! path /usr/lib/node_modules/npm/node_modules/node-gyp
npm ERR! code EEXIST
npm ERR! errno -17
npm ERR! syscall mkdir
npm ERR! EEXIST: file already exists, mkdir '/usr/lib/node_modules/npm/node_modules/node-gyp'
npm ERR! File exists: /usr/lib/node_modules/npm/node_modules/node-gyp
npm ERR! Move it away, and try again.
npm ERR! Please include the following file with any support request:
npm ERR! /root/npm-debug.log
npm ERR! code 1
最终遇到的问题是npm无法安装。
日志文件位于https://www.dropbox.com/s/2maxolbxjlnnp7c/npm-debug_error.log.txt?dl=0
我的Node版本是6.10.2,使用Fedora Core 25 64位。NPM版本为3.10.10。
我还在https://github.com/npm/registry/issues/168上创建了一个问题。
现在,npm未安装:
npm
-bash:/usr/bin/npm:没有那个文件或目录
明天我将按照https://github.com/brock/node-reinstall的步骤进行操作,如果没有其他建议则尝试完全卸载和重新安装Node。
我运行此npm更新,因为这是Polymer 2.0中安装polymer-cli的第一步。
npm update npm
呢? - Pablo Darde