I'm stuck on the last bit of the fourth MDN tutorial where you're to run nodemon to check out your routes/controllers to see what you've done running them on a localhost. It says I have an error with routing and requires a callback function of an undefined object. I've googled and gone to the lesson's GitHub and gone through and redone code and read blocks of code myself and am still stuck. It appears to be an issue regarding the author GET section of my routes catalog. I've listed the code at the bottom.
I can't quite figure out what is wrong as I've copied and pasted the whole lesson and followed the instructions. I even thought that one of the issues was that I hadn't made it into a local repository and did that but it turned out it was actually a duplicate file in the parent folder of the same name so I had to cd express-locallibrary-tutorial and then was finally able to locate the files needed.
________@Bridgettes-MacBook-Air express-locallibrary-tutorial % DEBUG=express-locallibrary-tutorial:* npm run devstart
> express-locallibrary-tutorial@0.0.0 devstart /Users/_____/Desktop/express-locallibrary-tutorial/express-locallibrary-tutorial
> nodemon ./bin/www
[nodemon] 2.0.12
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node ./bin/www`
/Users/_______/Desktop/express-locallibrary-tutorial/express-locallibrary-tutorial/node_modules/express/lib/router/route.js:202
throw new Error(msg);
^
Error: Route.get() requires a callback function but got a [object Undefined]
at Route.<computed> [as get] (/Users/_______/Desktop/express-locallibrary-tutorial/express-locallibrary-tutorial/node_modules/express/lib/router/route.js:202:15)
at Function.proto.<computed> [as get] (/Users/_________/Desktop/express-locallibrary-tutorial/express-locallibrary-tutorial/node_modules/express/lib/router/index.js:510:19)
at Object.<anonymous> (/Users/___________/Desktop/express-locallibrary-tutorial/express-locallibrary-tutorial/routes/catalog.js:56:8)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (/Users/__________/Desktop/express-locallibrary-tutorial/express-locallibrary-tutorial/app.js:13:21)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:92:18)
[nodemon] app crashed - waiting for file changes before starting...
Line 56:8
// GET request to update Author.
router.get('/author/:id/update', author_controller.author_update_get);
Line 13:21
var catalogRouter = require('./routes/catalog'); //Import routes for "catalog" area of site