為什么縮進也沒錯就是一直解決不了呢
TypeError: F:\一起發\htdocs\imooc\views\index.jade:7
? ?5| ? ? ? ? ? ? .col-md-2?
? ?6| ? ? ? ? ? ? ? ? .thumbnail?
?> 7| ? ? ? ? ? ? ? ? ? ? each item in movies?
? ?8| ? ? ? ? ? ? ? ? ? ? ? ? a(href="/movie/#{item._id}")?
? ?9| ? ? ? ? ? ? ? ? ? ? ? ? ? ? img(src="#{item.poster}",alt="#{item.title}")?
? ?10| ? ? ? ? ? ? ? ? ? ? ? ? .caption?
Cannot read property 'length' of undefined
? ?at eval (eval at <anonymous> (F:\一起發\htdocs\imooc\node_modules\jade\lib\index.js:218:8), <anonymous>:69:31)
? ?at eval (eval at <anonymous> (F:\一起發\htdocs\imooc\node_modules\jade\lib\index.js:218:8), <anonymous>:154:4)
? ?at eval (eval at <anonymous> (F:\一起發\htdocs\imooc\node_modules\jade\lib\index.js:218:8), <anonymous>:176:22)
? ?at res (F:\一起發\htdocs\imooc\node_modules\jade\lib\index.js:219:38)
? ?at Object.exports.renderFile (F:\一起發\htdocs\imooc\node_modules\jade\lib\index.js:380:38)
? ?at Object.exports.renderFile (F:\一起發\htdocs\imooc\node_modules\jade\lib\index.js:370:21)
? ?at View.exports.__express [as engine] (F:\一起發\htdocs\imooc\node_modules\jade\lib\index.js:417:11)
? ?at View.render (F:\一起發\htdocs\imooc\node_modules\express\lib\view.js:126:8)
? ?at tryRender (F:\一起發\htdocs\imooc\node_modules\express\lib\application.js:639:10)
? ?at EventEmitter.render (F:\一起發\htdocs\imooc\node_modules\express\lib\application.js:591:3)
2016-12-26
同第一個答案,然后最重要的一點,所有改動結束以后,請重啟服務
2016-10-30
解決了嗎?我也遇到這個問題,解決不了
2016-08-24
檢查你在app.js里的index page接口參數movies的格式是否是movies:[{}],形式是否正確
查看jade里的each item in movies是參數是否正確,不過看了這里應該沒問題的,和appjs里的參數movies要對應