TypeError: Cannot read property 'movies' of null
? ? events.js:183
? ? ? ? ? throw er; // Unhandled 'error' event
? ? ? ? ? ^
? ? TypeError: Cannot read property 'movies' of null
? ? ? ? at Category.findById (E:\PHP\my-move\app\controllers\movie.js:75:26)
? ? ? ? at E:\PHP\my-move\node_modules\mongoose\lib\model.js:4208:16
? ? ? ? at (anonymous function).call (E:\PHP\my-move\node_modules\mongoose\lib\query.js:3128:7)
? ? ? ? at model.Query.Query._completeOne (E:\PHP\my-move\node_modules\mongoose\lib\query.js:1479:12)
? ? ? ? at Immediate.Query.base.findOne.call (E:\PHP\my-move\node_modules\mongoose\lib\query.js:1535:10)
? ? ? ? at Immediate._onImmediate (E:\PHP\my-move\node_modules\mquery\lib\utils.js:119:16)
? ? ? ? at runCallback (timers.js:794:20)
? ? ? ? at tryOnImmediate (timers.js:752:5)
? ? ? ? at processImmediate [as _immediateCallback] (timers.js:729:5)
2018-07-07
已經解決了,在admin.jade中有一處沒有將catetory改為category