I am roughly 47 minutes into the Node.js With Passport Authentication | Full Project YouTube tutorial and I am having an issue with console.log(newUser). Instead of repeating the details entered into the website into the console like it does in the video it gives me a ReferenceError that newUser is not definded.
ReferenceError: newUser is not defined at C:\xampp\htdocs\node_passport_login\routes\users.js:65:25 at Layer.handle [as handle_request] (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\layer.js:95:5) at next (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\route.js:137:13) at Route.dispatch (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\route.js:112:3) at Layer.handle [as handle_request] (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\layer.js:95:5) at C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:281:22 at Function.process_params (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:335:12) at next (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:275:10) at Function.handle (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:174:3) at router (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:47:12) at Layer.handle [as handle_request] (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\layer.js:95:5) at trim_prefix (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:317:13) at C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:284:7 at Function.process_params (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:335:12) at next (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:275:10) at C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:635:15
I have attached my routes/users.js to this issue.
users.zip
I am roughly 47 minutes into the Node.js With Passport Authentication | Full Project YouTube tutorial and I am having an issue with console.log(newUser). Instead of repeating the details entered into the website into the console like it does in the video it gives me a ReferenceError that newUser is not definded.
ReferenceError: newUser is not defined at C:\xampp\htdocs\node_passport_login\routes\users.js:65:25 at Layer.handle [as handle_request] (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\layer.js:95:5) at next (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\route.js:137:13) at Route.dispatch (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\route.js:112:3) at Layer.handle [as handle_request] (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\layer.js:95:5) at C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:281:22 at Function.process_params (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:335:12) at next (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:275:10) at Function.handle (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:174:3) at router (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:47:12) at Layer.handle [as handle_request] (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\layer.js:95:5) at trim_prefix (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:317:13) at C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:284:7 at Function.process_params (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:335:12) at next (C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:275:10) at C:\xampp\htdocs\node_passport_login\node_modules\express\lib\router\index.js:635:15
I have attached my routes/users.js to this issue. users.zip