今天在安装mpn i 的时候 总是出现错误
发布于 8 年前 作者 yun313350095 4153 次浏览 来自 问答

iconv@2.2.1 install /root/.nvm/versions/node/v6.3.0/lib/node_modules/iconv

node-gyp rebuild

sh: node-gyp: command not found npm ERR! Linux 3.10.0-229.el7.x86_64 npm ERR! argv “/root/.nvm/versions/node/v6.3.0/bin/node” “/root/.nvm/versions/node/v6.3.0/bin/npm” “i” “-g” "iconv" npm ERR! node v6.3.0 npm ERR! npm v3.10.8 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn

npm ERR! iconv@2.2.1 install: node-gyp rebuild npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the iconv@2.2.1 install script ‘node-gyp rebuild’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the iconv package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs iconv npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls iconv npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /vagrant/decide_server/data/node_modules/npm-debug.log

求大神指点一二

4 回复

node-gyp: command not found

要么是node没有正确安装,要么就是权限不对

查看下 python的版本

尝试一下:npm i node-gyp

回到顶部