在创建路由的时候出现问题
Error: Failed to lookup view "error" in views directory "/Users/mao/Desktop/node/views"
at EventEmitter.render (/Users/mao/Desktop/node/node_modules/express/lib/application.js:579:17)
at ServerResponse.render (/Users/mao/Desktop/node/node_modules/express/lib/response.js:961:7)
at /Users/mao/Desktop/node/app.js:75:7
at Layer.handle_error (/Users/mao/Desktop/node/node_modules/express/lib/router/layer.js:71:5)
at trim_prefix (/Users/mao/Desktop/node/node_modules/express/lib/router/index.js:310:13)
at /Users/mao/Desktop/node/node_modules/express/lib/router/index.js:280:7
at Function.process_params (/Users/mao/Desktop/node/node_modules/express/lib/router/index.js:330:12)
at IncomingMessage.next (/Users/mao/Desktop/node/node_modules/express/lib/router/index.js:271:10)
at done (/Users/mao/Desktop/node/node_modules/express/lib/response.js:956:25)
at EventEmitter.render (/Users/mao/Desktop/node/node_modules/express/lib/application.js:581:14)
app.set('views', './views'); 最开始的时候使用的是这个
app.set('views', path.join(__dirname, './views')); 后来我已经换成了绝对路径了,但是还是出现错误