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

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

  

原文地址:https://www.cnblogs.com/luxh/p/3685487.html