使用 npm 安装 express [英] install express with npm
问题描述
我最近在 64 位 ubuntu 上安装了 nodejs 版本 0.10.26.node -v 和 npm -v 命令运行良好,我可以看到正确的版本.当我执行 $ sudo npm install -g express
安装顺利.但是当我尝试使用 express as $ express myProject
创建一个项目时,我收到一个错误消息
I recently installed nodejs version 0.10.26 on ubuntu 64 bit. node -v and npm -v commands run fine and I can see the correct versions. When I do a $ sudo npm install -g express
the installation goes fine. But when I try to create a project with express as $ express myProject
I get an error saying
当前未安装程序express".你可以安装它键入:sudo apt-get install node-express
The program 'express' is currently not installed. You can install it by typing: sudo apt-get install node-express
我是否必须在 $PATH 中包含一些路径才能运行 express?请帮忙.
Do I have to include some path in $PATH in order to run express? Please help.
推荐答案
在 Express 4 中,应用程序生成器被移除,现在可以作为express-generator"使用.所以你需要 npm install -g express-generator
代替.
With Express 4, the application generator was removed and is now available as 'express-generator.' So you need to npm install -g express-generator
instead.
这篇关于使用 npm 安装 express的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!