简体   繁体   English

使用 npm 安装 express 时出现问题。

[英]Problems installing express using npm.

Im trying to install express using npm, running this code:我正在尝试使用 npm 安装 express,运行以下代码:

npm install express mongoose jade less expresso npm 装快递 mongoose 玉少快递

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.干杯。

You don't have make, you must install it (it's a part of gcc).你没有 make,你必须安装它(它是 gcc 的一部分)。

If you're on a Debian-based linux distribution:如果您使用的是基于 Debian 的 linux 发行版:

sudo apt-get install build-essential

If you're on Mac OS X you must install XCode and then install its Command Line Tools:如果您使用的是 Mac OS X,则必须安装 XCode,然后安装其命令行工具:

Install XCode 4 then open it, Got to Preferences -> Downloads -> Components -> Click on Command Line Tools and then click on its Install button.安装 XCode 4 然后打开它,转到首选项 -> 下载 -> 组件 -> 单击命令行工具,然后单击其安装按钮。


And I just hope you're not on Windows, because I won't be able to help you hehe:-P我只希望你不在 Windows,因为我帮不了你呵呵:-P

Hope this helps!希望这可以帮助!

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.") TomShreds 所说的,您可能还想将“expresso”换成“mocha”,后者是 expresso 的替代品(来自 expresso 的 GitHub 自述文件:“请务必查看 Expresso 的继任者 Mocha。”)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM