Problems installing express using npm.

痞子三分冷 提交于 2021-01-29 05:44:47

问题


Im trying to install express using npm, running this code:

npm install express mongoose jade less expresso

But i keep getting this error,

> make deps/jscoverage/node-jscoverage

sh: make: command not found

npm ERR! expresso@0.9.2 preinstall: `make deps/jscoverage/node-jscoverage`
npm ERR! `sh "-c" "make deps/jscoverage/node-jscoverage"` failed with 127
npm ERR! Failed at the expresso@0.9.2 preinstall script.
npm ERR! This is most likely a problem with the expresso package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     make deps/jscoverage/node-jscoverage

I searched a lot and can't seem to find the answer. Cheers.


回答1:


You don't have make, you must install it (it's a part of gcc).

If you're on a Debian-based linux distribution:

sudo apt-get install build-essential

If you're on Mac OS X you must install XCode and then install its Command Line Tools:

Install XCode 4 then open it, Got to Preferences -> Downloads -> Components -> Click on Command Line Tools and then click on its Install button.


And I just hope you're not on Windows, because I won't be able to help you hehe :-P

Hope this helps!




回答2:


What TomShreds said, and you may also want to swap "expresso" for "mocha", which kind of replaced expresso (from expresso's GitHub readme: "Be sure to check out Expresso's successor Mocha.")



来源:https://stackoverflow.com/questions/10075969/problems-installing-express-using-npm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!