[英]getting errors while doing npm in my project
I am doing npm install and getting these errors. 我正在安装npm并收到这些错误。 Cant figure out what is really going on or what am I really missing here.
不能弄清楚到底是怎么回事或我在这里真正想念的是什么。 I tried manually installing node-gyp but when I try to run gulp I get "command not found".
我尝试手动安装node-gyp,但是当我尝试运行gulp时,出现“找不到命令”。 Totally frustrating
完全令人沮丧
16 errors generated.
make: *** [Release/obj.target/lwip_decoder/src/decoder/init.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/usr/local/Cellar/node/4.1.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/soum/Documents/movado/preprocessed/node_modules/css-sprite/node_modules/lwip
gyp ERR! node -v v4.1.0
gyp ERR! node-gyp -v v3.0.1
gyp ERR! not ok
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/Cellar/node/4.1.0/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.1.0
npm ERR! npm v2.14.4
npm ERR! code ELIFECYCLE
npm ERR! lwip@0.0.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lwip@0.0.6 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the lwip 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 their info via:
npm ERR! npm owner ls lwip
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/soum/Documents/movado/preprocessed/npm-debug.log
This is a known issue with gyp/node-gyp that affects all platforms. 这是gyp / node-gyp的已知问题 ,会影响所有平台。
node-gyp is no longer actively supported, so it does not work with newer versions of Node.js. 不再积极支持node-gyp,因此它不适用于更新版本的Node.js。 You need to uninstall 4.1.0, so if you are using Homebrew:
您需要卸载4.1.0,因此,如果您使用的是Homebrew:
sudo brew uninstall node.js
Then install version 0.12.7, which worked for me (I'm also on Mac OSX - Darwin 14.5.0). 然后安装对我有用的版本0.12.7(我也在Mac OSX-Darwin 14.5.0上)。 I installed 0.12.7 by downloading the pkg from nodejs.org .
我通过从nodejs.org下载pkg安装了0.12.7 。
lwip软件包需要在安装时进行构建,看起来您没有一个(或多个)此软件包(gcc,g ++,make),因此请尝试运行sudo apt-get install gcc && sudo apt-get install g++ && sudo apt-get install make
,然后重试
I solved the " node-gyp rebuild " issue by setting npm to point to the preferred version of python v2.7, following instructions at https://github.com/nodejs/node-gyp#installation . 我按照https://github.com/nodejs/node-gyp#installation上的说明,通过将npm设置为指向python v2.7的首选版本,解决了“ node-gyp重建 ”问题。 I hit this problem installing lwip on Ubuntu 14.0.4 with node v4.2.4 and node-gyp v3.5.0.
我遇到了在具有节点v4.2.4和node-gyp v3.5.0的Ubuntu 14.0.4上安装lwip的问题。 Solved it by:
解决方法:
$ whereis python
python: /usr/bin/python /usr/bin/python3.4m /usr/bin/python2.7
$ npm config set python /usr/bin/python2.7
$ npm install lwip
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.