加上支持expression
我想为我的快递添加支持。 我已经看到这个教程正在显示
$ express -h Usage: express [options] [dir] Options: -h, --help output usage information -V, --version output the version number -e, --ejs add ejs engine support (defaults to jade) --hbs add handlebars engine support -H, --hogan add hogan.js engine support -c, --css <engine> add stylesheet <engine> support (less|stylus|compass|sass) (defaults to plain css) --git add .gitignore -f, --force force on non-empty directory
但是当我在我的机器上安装它显示
$ express -h Usage: express [options] [path] Options: -s, --sessions add session support -t, --template <engine> add template <engine> support (jade|ejs). default=jade -c, --css <engine> add stylesheet <engine> support (stylus). default=plain css -v, --version output framework version -h, --help output help information
我错过了什么?
本教程显示如果使用由npm install -g express-generator
的CLI运行express -h
,将会得到什么结果。
您的结果是运行express -h
的结果,包含在旧版本的Express中,例如2.5.11。 当前版本4.3.13没有CLI。
如果您使用的是类Unix操作系统,则可以which express
方式找出正在执行的文件的位置。 如果是系统文件(比如/usr/local/bin/express
),你可以试试npm uninstall -g express && npm install -g express-generator
。 一般来说,你不需要或需要express
安装全球。
- 快速js(nodejs)如何启动应用程序? TypeError:app.set不是一个函数
- 如何用node.js发送文件
- passport.js和process.nextTick在策略中
- NodeJS,Webpack,意外的标记<
- NodeJS + Redis + Express + Passport Facebook身份validation失败
- NodeJS:使用connect-flash的Express 3.0(根据护照本地策略中的build议),仍然发现req.flash的exception
- 在Express.js中app.post(..)提供了什么独特的function
- 即使configuration了express.static,Express.js也无法访问静态文件
- 如何从外部导入webpack条目文件的默认导出?