使用以下命令创建新包时,NodeJS.express出现问题:
express test_web
它已成功创建,但是当我打开localhost:3000
主页时,它无法访问parse
方法!
这是一个完整的页面:
Express
500 TypeError: /Users/user/Documents/p/hello_test/views/index.jade:5 3| block content 4| h1= title > 5| p Welcome to #{title} Object #<Object> has no method 'parse'
at detect (/Users/user/Documents/p/hello_test/node_modules/jade/node_modules/with/index.js:33:22)
at addWith (/Users/user/Documents/p/hello_test/node_modules/jade/node_modules/with/index.js:8:28)
at parse (/Users/user/Documents/p/hello_test/node_modules/jade/lib/jade.js:105:11)
at Object.exports.compile (/Users/user/Documents/p/hello_test/node_modules/jade/lib/jade.js:142:9)
at Object.exports.render (/Users/user/Documents/p/hello_test/node_modules/jade/lib/jade.js:196:15)
at Object.exports.renderFile (/Users/user/Documents/p/hello_test/node_modules/jade/lib/jade.js:233:18)
at View.exports.renderFile [as engine] (/Users/user/Documents/p/hello_test/node_modules/jade/lib/jade.js:218:21)
at View.render (/Users/user/Documents/p/hello_test/node_modules/express/lib/view.js:76:8)
at Function.app.render (/Users/user/Documents/p/hello_test/node_modules/express/lib/application.js:506:10)
at ServerResponse.res.render (/Users/user/Documents/p/hello_test/node_modules/express/lib/response.js:803:7)
我该如何解决这个问题?