Error: Your pre must have a next argument -- e.g., function (next, ...)
$ node app.js
127.0.0.1:8080
Error: Your pre must have a next argument -- e.g., function (next, ...)
at _next (D:\node\cinema\node_modules\_hooks-fixed@2.0.2@hooks-fixed\hooks.j
s:58:23)
at fnWrapper (D:\node\cinema\node_modules\_hooks-fixed@2.0.2@hooks-fixed\hoo
ks.js:190:8)
at model.<anonymous> (D:\node\cinema\node_modules\_mongoose@4.13.4@mongoose\
lib\plugins\saveSubdocs.js:20:7)
at _next (D:\node\cinema\node_modules\_hooks-fixed@2.0.2@hooks-fixed\hooks.j
s:63:32)
at fnWrapper (D:\node\cinema\node_modules\_hooks-fixed@2.0.2@hooks-fixed\hoo
ks.js:190:8)
at D:\node\cinema\node_modules\_mongoose@4.13.4@mongoose\lib\plugins\validat
eBeforeSave.js:33:13
at D:\node\cinema\node_modules\_kareem@1.5.0@kareem\index.js:131:16
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
events.js:160
throw er; // Unhandled 'error' event
^
TypeError: Cannot read property '_id' of undefined
at D:\node\cinema\app.js:132:34
at D:\node\cinema\node_modules\_mongoose@4.13.4@mongoose\lib\model.js:4038:1
6
at D:\node\cinema\node_modules\_mongoose@4.13.4@mongoose\lib\services\model\
applyHooks.js:175:17
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)