Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error even with source code for lecture 78 (previous lecture Nr52 ? ) #3

Open
TheLaughingThird opened this issue Nov 15, 2022 · 0 comments

Comments

@TheLaughingThird
Copy link

TheLaughingThird commented Nov 15, 2022

Hello,

There seems to be a problem with the 52-end.zip source code package. In lesson 78 I cant get the author name to be dynamic and my app keeps crashing. Link to course: https://www.udemy.com/course/learn-javascript-full-stack-from-scratch/learn/lecture/15187916

When you try to visit a post you do have created like this example.

http://localhost:3000/post/63737db924dc689ee19085eb
When you run it , it throws a error.

I was comparing my code with the source code because I thought I made a typo, but this error also shows up when running your source code

The error

/var/www/html/52/models/Post.js:67
username: post.author.username,
TypeError: Cannot read properties of undefined (reading 'username')
at /var/www/html/52/models/Post.js:67:31
at Array.map ()
at /var/www/html/52/models/Post.js:65:19
at processTicksAndRejections (node:internal/process/task_queues:96:5)

Enclosure
52-end.zip

@TheLaughingThird TheLaughingThird changed the title Error even with source code for lecture 72 (previous lecture Nr52 ? ) Error even with source code for lecture 78 (previous lecture Nr52 ? ) Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant