出现has no method 'router'解决办法
 发布于 12 年前  作者 qwqw123  5347 次预览  最后一次回复是 12 年前  来自  

出现has no method 'router’解决办法 把书上这个删掉app.use(express.router(routes)); 换成app.use(app.router);然后再下边加上routes(app);就可以了,node版本太混乱了

4 回复
leizongmin

问题描述不准确。

youxiachai

…这个node 躺着中枪…你应该吐槽expres 才对…

brighthas

书的express是2.x ,现在都是 Express 3.x了,如果按照书上学就用 2.x