0
我開始學習使用Express的網絡應用程序的Node.JS。最初看着Jade,我想要更多...... HTML-y。所以,我看着jshtml。我用它來生成一個樣板應用程序:Express和JSHtml產生TypeError
$ express --jshtml -c less
而這產生了一些看起來很正常的東西。然而,當我真正運行它,我得到這個試圖查看索引頁:
TypeError: Property 'engine' of object #<View> is not a function
at View.render (/home/earlz/projects/extest/node_modules/express/lib/view.js:76:8)
at Function.app.render (/home/earlz/projects/extest/node_modules/express/lib/application.js:504:10)
at ServerResponse.res.render (/home/earlz/projects/extest/node_modules/express/lib/response.js:798:7)
at exports.index (/home/earlz/projects/extest/routes/index.js:7:7)
at callbacks (/home/earlz/projects/extest/node_modules/express/lib/router/index.js:164:37)
at param (/home/earlz/projects/extest/node_modules/express/lib/router/index.js:138:11)
at pass (/home/earlz/projects/extest/node_modules/express/lib/router/index.js:145:5)
at Router._dispatch (/home/earlz/projects/extest/node_modules/express/lib/router/index.js:173:5)
at Object.router (/home/earlz/projects/extest/node_modules/express/lib/router/index.js:33:10)
at next (/home/earlz/projects/extest/node_modules/express/node_modules/connect/lib/proto.js:193:15)
GET/500 20ms
我必須安裝其他東西?或者我如何得到這個工作?