jade模板配置報錯
和老師寫的代碼一樣,但是一運行就報以下錯誤,為什么?。?/p>
Error: No default engine was specified and no extension was provided.
? ?at new View (e:\imooc\node_modules\express\lib\view.js:62:11)
? ?at EventEmitter.render (e:\imooc\node_modules\express\lib\application.js:569:12)
? ?at ServerResponse.render (e:\imooc\node_modules\express\lib\response.js:961:7)
? ?at e:\imooc\app.js:16:9
? ?at Layer.handle [as handle_request] (e:\imooc\node_modules\express\lib\router\layer.js:95:5)
? ?at next (e:\imooc\node_modules\express\lib\router\route.js:131:13)
? ?at Route.dispatch (e:\imooc\node_modules\express\lib\router\route.js:112:3)
? ?at Layer.handle [as handle_request] (e:\imooc\node_modules\express\lib\router\layer.js:95:5)
? ?at e:\imooc\node_modules\express\lib\router\index.js:277:22
? ?at Function.process_params (e:\imooc\node_modules\express\lib\router\index.js:330:12)
2016-04-22
npm install jade
然后就可以了啊,安裝就配置了,如果在服務器上,那么服務器也要同步安裝。
2016-04-19
你要配置jade為默認模板引擎才行。