[英]Installing node.js with express module
I'm on latest stable debian I am able to do apt-get install nodejs
but cannot install npm with apt, so I compiled from wget http://nodejs.org/dist/v0.8.16/node-v0.8.16.tar.gz
and everything looks good. 我在最新的稳定的debian上,我能够apt-get install nodejs
但不能用apt安装npm,所以我从wget http://nodejs.org/dist/v0.8.16/node-v0.8.16.tar.gz
编译了wget http://nodejs.org/dist/v0.8.16/node-v0.8.16.tar.gz
,一切看起来都不错。
Now I want to install the express module globally and did sudo npm install -g express
现在我想全局安装express模块,并做了sudo npm install -g express
but I get this warning: 但我得到这个警告:
npm WARN engine express@4.11.1: wanted: {"node":">= 0.10.0"} (current: {"node":"v0.8.16","npm":"1.1.69"})
then typing express
in the commandline says command not found. 然后在命令行中键入express
表示找不到命令。 What am I doing wrong? 我究竟做错了什么?
I was on the old version. 我使用的是旧版本。 I needed to get the latest one from here: 我需要从这里获取最新的:
http://nodejs.org/dist/latest/node-v0.10.36.tar.gz http://nodejs.org/dist/latest/node-v0.10.36.tar.gz
Then running the commands after untaring 解压后再运行命令
./configure
make
sudo make install
Then npm install -g express
然后npm install -g express
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.