北在北方

太白枝头看,花开不计年,杯中浮日月,楼外是青天。

导航

安装express后却找不到express的命令

Posted on 2014-04-24 14:43  CN.programmer.Luxh  阅读(945)  评论(0编辑  收藏  举报

1、全局安装express 

npm install -g express

2、执行express命令,创建web项目框架

express -e ejs myweb

  会提示 express 不是内部或外部命令

3、找了很久的资料,后面在stackoverflow上找到答案。

  http://stackoverflow.com/questions/11663590/issues-with-installing-express-js-in-windows-7?rq=1

 

  In later versions of express comand line was migrated to a separate module: express-generetor,最新版本的express命令已经迁移到一个单独的模块express-generetor

 

  其实express 的官方向导中也有说明:http://expressjs.com/guide.html

4、ok,安装express-generetor,问题解决。

npm install -g express-generator@3