Advertisement
phiyenv

Error: Route.post() requires a callback function but got a [object Undefined]

Dec 20th, 2021 (edited)
1,895
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [nodemon] starting `webpack --mode=development --config webpack.config.server.js && node ./dist/server.generated.js`
  2. Hash: e82da5c29b9639def338
  3. Version: webpack 4.42.1
  4. Time: 1456ms
  5. Built at: 20/12/2021 12:06:26
  6.                                Asset     Size  Chunks             Chunk Names
  7. 08179a3b58e30f3c8c4fed34a9a3e2f8.jpg  790 KiB          [emitted]
  8.                  server.generated.js  183 KiB    main  [emitted]  main
  9. Entrypoint main = server.generated.js
  10. [0] multi ./server/server.js 28 bytes {main} [built]
  11. [./client/MainRouter.js] 2.02 KiB {main} [built]
  12. [./client/theme.js] 1.39 KiB {main} [built]
  13. [./config/config.js] 1.21 KiB {main} [built]
  14. [./node_modules/webpack/buildin/harmony-module.js] (webpack)/buildin/harmony-module.js 573 bytes {main} [built]
  15. [./server/devBundle.js] 1.43 KiB {main} [built]
  16. [./server/express.js] 3.26 KiB {main} [built]
  17. [./server/routes/auth.routes.js] 1.13 KiB {main} [built]
  18. [./server/routes/course.routes.js] 1.65 KiB {main} [built]
  19. [./server/routes/user.routes.js] 1.41 KiB {main} [built]
  20. [./server/server.js] 662 bytes {main} [built]
  21. [./template.js] 1.66 KiB {main} [built]
  22. [@material-ui/styles] external "@material-ui/styles" 42 bytes {main} [built]
  23. [body-parser] external "body-parser" 42 bytes {main} [built]
  24. [mongoose] external "mongoose" 42 bytes {main} [built]
  25.     + 74 hidden modules
  26. C:\Coding\master-baguette\node_modules\express\lib\router\route.js:202
  27.         throw new Error(msg);
  28.         ^
  29.  
  30. Error: Route.post() requires a callback function but got a [object Undefined]
  31.     at Route.<computed> [as post] (C:\Coding\master-baguette\node_modules\express\lib\router\route.js:202:15)
  32.     at Module.eval (webpack:///./server/routes/course.routes.js?:21:41)
  33.     at eval (webpack:///./server/routes/course.routes.js?:46:30)
  34.     at Module../server/routes/course.routes.js (C:\Coding\master-baguette\dist\server.generated.js:420:1)
  35.     at __webpack_require__ (C:\Coding\master-baguette\dist\server.generated.js:21:30)
  36.     at Module.eval (webpack:///./server/express.js?:19:80)
  37.     at eval (webpack:///./server/express.js?:136:30)
  38.     at Module../server/express.js (C:\Coding\master-baguette\dist\server.generated.js:360:1)
  39.     at __webpack_require__ (C:\Coding\master-baguette\dist\server.generated.js:21:30)
  40.     at eval (webpack:///./server/server.js?:3:66)
  41.     at Module../server/server.js (C:\Coding\master-baguette\dist\server.generated.js:444:1)
  42.     at __webpack_require__ (C:\Coding\master-baguette\dist\server.generated.js:21:30)
  43.     at eval (webpack:///multi_./server/server.js?:1:18)
  44.     at Object.0 (C:\Coding\master-baguette\dist\server.generated.js:478:1)
  45.     at __webpack_require__ (C:\Coding\master-baguette\dist\server.generated.js:21:30)
  46.     at C:\Coding\master-baguette\dist\server.generated.js:85:18
  47. [nodemon] app crashed - waiting for file changes before starting...
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement