CNode

Node Clud 启动时包这个, 不明白什么问题

Sspringlin2012发布于14 年前最后回复14 年前3 回复5509 浏览0 收藏

path.exists is now called fs.exists. Warning: express.createServer() is deprecated, express applications no longer inherit from http.Server, please use:

var express = require("express"); var app = express();

F:\J2EE_WEB_Develop\Nodejs\Items\cnodejs-nodeclub\app.js:33 app.register('.html', require('ejs')); ^ TypeError: Object function app(req, res){ app.handle(req, res); } has no method 'register' at Function. (F:\J2EE_WEB_Develop\Nodejs\Items\cnodejs-nodeclub\app.js:33:7) at Function.app.configure (C:\Program Files\nodejs\node_modules\express\lib\application.js:399:6 1) at Object. (F:\J2EE_WEB_Develop\Nodejs\Items\cnodejs-nodeclub\app.js:29:5) at Module._compile (module.js:449:26) at Object.Module._extensions..js (module.js:467:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.runMain (module.js:492:10) at process.startup.processNextTick.process._tickCallback (node.js:244:9)

查看回复

回复 (3)

S
sumory#1·14 年前

第一个是node新版本的api变动; 第二个是你用的express3,node club用的express2

S
springlin2012#2·14 年前
参与回复
登录后即可参与回复。登录