express@4.0.*
$ 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
: The program 'express' is currently not installed. You can install it by typing: sudo apt-get install node-express
The new version of Express (4.0) does not itself have a bin folder. You have to install express-generator to get the setup functionality.
You are not doing anything wrong. Express has just changed the way it works. Have a look at this answer.
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.
express@4.0.*的更多相关文章
- Node Express 4.0 安装
前言 今天想要用nodejs 写个后台服务,很久之前看过node express 框架,可真当向下手安装的时候,发现好多命令都不记得了.写完后台服务,没事了,总结了下安装过程,记录一下,以便以后查阅方 ...
- NodeJS - Express 4.0下使用app.dynamicHelpers错误
在NodeJS - Express 4.0下使用app.dynamicHelpers发生错误: app.dynamicHelpers({ ^ TypeError: Object function (r ...
- NodeJS -Express 4.0 用include取代partial
在Express 4.0 下按如下方法设置: (1)运行cmd 输入:npm install express-partials -g (2)下载成功后.在app.js 中引用此插件 var par ...
- NodeJS - Express 3.0下ejs模板使用 partial展现 片段视图
如果你也在看Node.js开发指南,如果你也在一步一步实现 microBlog 项目!也许你会遇到本文提到的问题,如果你用的是Express 3.0 本书实例背景是 Express 2.0 而如今升级 ...
- express 3.0.x 中默认不支持layout.ejs的解决方法
1.第一种方法用include 用<% include 模板名(可不加.ejs) %>的写法,具体如下 <% include header %> //套用布局拆成两部分 hea ...
- Express 3.0新手指南入门教程
在确认已经安装了node之后(下载), 在你的机器上创建一个目录,让我们来开始你的第一个应用程序吧 $ mkdir hello-world 在这个目录中你首先得定义一下你的应用程序“包”文件,它和其它 ...
- NodeJS - Express 4.0错误:Cannot read property 'Store' of undefined
按着<NodeJS开发指南>里的第五章建立microblog的例子操作,使用node.js 的express框架配置将session存储到mongodb时出错:TypeError: Can ...
- express 4.0 connect-mongo 运行时报错的解决方法
如果使用的是express 4.0,且入口文件app.js的模板引入和中间件配置如下 如果你的package.json文件中有以下版本信息 报出的错误如下所示 或者 那么只需修改app.js中 ...
- Node + Express + vue2.0 + Webpack项目实践
技术 Express.Vue.Vue-Router.Vue-Resource.Webpack Vue vue 的组件化思想和 React 很像,一个 vue 组件将 html.css 和 js 都写在 ...
随机推荐
- JavaScript Diagramming
JavaScript Diagramming Optensity
- 使用apache htpasswd生成加密的password文件,并使用.htaccess控制文件夹訪问
htpasswd 是apache的小工具.在apache安装文件夹bin下可找到. Usage: htpasswd [-cmdpsD] passwordfile username htpasswd - ...
- TSL / SSL
参考: http://www.ruanyifeng.com/blog/2014/09/illustration-ssl.html http://www.tuicool.com/articles/IJ3 ...
- Ant构建文件解析
<?xml version="1.0" encoding="UTF-8"?> <!-- 在Ant脚本中,project是这个XML文档的根结点 ...
- 【IntellJ IDEA】idea上所有代码都报错了
可能会碰到蓝屏,内存溢出重启idea等特殊情况. 重新打开idea后发现原本的代码全都报错了 正确的解决方法: 方法很简单 执行idea工具栏上下面的菜单: File -> Invalidate ...
- 深度学习教程Deep Learning Tutorials
Deep Learning Tutorials Deep Learning is a new area of Machine Learning research, which has been int ...
- 策略模式Strategy——回家乘什么车?
1.问题与模式 时间:2014年6月 学校:廊坊师范 家:石家庄 人物:学生 又快到期末考试了,回家的节奏也奔上日程.无聊之余就想想这次回家的事儿.对我来说回家主 ...
- C语言中register类型的变量有什么意义
int i; for(i=0; i<1000; i++){ // Some Code } 为了解决这个问题,可以将使用频繁的变量放在CPU的通用寄存器中,这样使用该变量时就不必访问内存,直接从寄 ...
- js 获取url的get传值函数
function getvl(name) { var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)(\\s| ...
- 分别用Java和JS读取Properties文件内容
项目中经常用到的配置文件,除了XML文件之外,还会用到Properties文件来存储一些信息,例如国际化的设置.jdbc连接信息的配置等.有时候也会把一些路径或者sql语句放到Properties中, ...