-
Notifications
You must be signed in to change notification settings - Fork 283
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
seed.js does not populate users #10
Comments
I have posted the work around... let me know if you run into any issues
…On Tue, Mar 19, 2019 at 7:05 PM cozyxin ***@***.***> wrote:
I also have this problem and I cannot run node index.js to start the
server.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADW_5gaa57ku2Qkwat54KPTMXp6bCiMks5vYZeAgaJpZM4b3onW>
.
--
Best regards,
Philip
|
I have posted a workaround here which allows you to finish, hope this helps!
#10
…On Wed, Apr 10, 2019 at 7:26 AM Saad Tarek ***@***.***> wrote:
@mosh-hamedani <https://github.com/mosh-hamedani> any help!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADW__QXAML4VXSblZGQiyNYRa_JCx6Xks5vffR4gaJpZM4b3onW>
.
--
Best regards,
Philip
|
thank you for helping to resolve this! just one thing to add for newbies, start mongo by running "mongod" in one command prompt before you run "mongo" in another |
This is really helpful, thanks |
Issue still there. Thank you for the work around! |
Ran into this last night too. Thanks for the work around! I'm surprised that it's been 8 months and the issue still hasn't been addressed. |
@cyberena in section Authentication and Authorization, i get this error in console: do you know any work around for this. The code is the same as mosh did. I also can not insert data via postman and receive 500 internal sever error. |
thanks for the help @cyberena ! I have a similar issue to the one @ybakhshi stated above. I get the same 500 internal server error and when trying to submit the registration form I get "error: undefined No callback function was given" in Git Bash where I started the server. Could this be related to the way we have created users? Anyone that can help with this please? Many thanks in advance |
@veronicapc92 this is so annoying and no one really helped me out! i started another course in Udemy and progressed well . although i learned a lot here too. Are you also a new learner? |
@ybakhshi it's quite frustrating sometimes 😅 yes I'm new to web development, I started coding like 3 months ago I think I found the solution. The problem is coming from bcrypt. Bcrypt-nodejs is now deprecated so I have installed bcryptjs instead. Then I went to vidly-api-node/routes/users and replaced this code:
with this code:
Not sure the code is 100% correct but it seems to work. Please let me know if this works for you or if you find a better way of doing it |
hey @veronicapc92 ! i resolved that bug in the same way i guess . it was two months ago and i don't remember much. Perhaps we can do co-learning and help fixing our issues. You find me here on linkedin : |
Which bcryptjs version did you install?? |
I was able to get things working with bcrypt ^4.0.1 |
@iamraghudb I used bcryptjs ^2.4.3 |
Thank You Veronica @veronicapc92 |
@iamraghudb unfortunately I don't know what can be causing the error without seeing your code. However I recently discovered that Mosh has a forum where we can ask our questions https://forum.codewithmosh.com/ I hope it helps! |
I managed to get this working directly from the seed.js. You will need to make the following changes Top near the other const's Before the Inside Inside No more manual creating from the 1st step |
@cyberena |
Hello :) Since you are the last one that solved the problem could you please share your code how you solved this issue? Thanks |
Hello dude do you still need help?
7 Kasım 2022 Pazartesi tarihinde Mohamed Aly ***@***.***>
yazdı:
… @cyberena <https://github.com/cyberena>
Thanks a lot. You made my day !
Hello :)
Since you are the last one that solved the problem could you please share
your code how you solved this issue?
Thanks
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWZOYEHGHOSBATX34BMUHLLWHELOJANCNFSM4G66RHLA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hello
No i actually figured it out , thanks for reply
…On Sun, 27 Nov 2022 at 7:04 PM AltairDaMasyaf ***@***.***> wrote:
Hello dude do you still need help?
7 Kasım 2022 Pazartesi tarihinde Mohamed Aly ***@***.***>
yazdı:
> @cyberena <https://github.com/cyberena>
>
> Thanks a lot. You made my day !
>
> Hello :)
>
> Since you are the last one that solved the problem could you please share
> your code how you solved this issue?
>
> Thanks
>
> —
> Reply to this email directly, view it on GitHub
> <
#10 (comment)
>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AWZOYEHGHOSBATX34BMUHLLWHELOJANCNFSM4G66RHLA
>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYL6N2LS5ECBES7F2E6L5XLWKOIAPANCNFSM4G66RHLA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Ur welcome sorry for late replay:) if you need any help you can always ask.
And if I don't know it at least will learn it 👍
27 Kasım 2022 Pazar tarihinde Mohamed Aly ***@***.***> yazdı:
… Hello
No i actually figured it out , thanks for reply
On Sun, 27 Nov 2022 at 7:04 PM AltairDaMasyaf ***@***.***>
wrote:
> Hello dude do you still need help?
>
> 7 Kasım 2022 Pazartesi tarihinde Mohamed Aly ***@***.***>
> yazdı:
>
> > @cyberena <https://github.com/cyberena>
> >
> > Thanks a lot. You made my day !
> >
> > Hello :)
> >
> > Since you are the last one that solved the problem could you please
share
> > your code how you solved this issue?
> >
> > Thanks
> >
> > —
> > Reply to this email directly, view it on GitHub
> > <
> #10 (comment)-
1305752524
> >,
> > or unsubscribe
> > <
> https://github.com/notifications/unsubscribe-auth/
AWZOYEHGHOSBATX34BMUHLLWHELOJANCNFSM4G66RHLA
> >
> > .
> > You are receiving this because you commented.Message ID:
> > ***@***.***>
> >
>
> —
> Reply to this email directly, view it on GitHub
> <#10 (comment)-
1328295589>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/
AYL6N2LS5ECBES7F2E6L5XLWKOIAPANCNFSM4G66RHLA>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWZOYEGFTN27I3ADPN7TRV3WKOMSLANCNFSM4G66RHLA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Thank you. It was very helpful and solved the issue )) |
Thank you! This helped today! |
Hi, this problem still exists. It seems the github download as of today is incomplete and missing parts which completely hinders the ability to continue the tutorial. I spent a while to figure it out and this is how you can insert it yourself and then also change the api so that it is readable by the web.
Go to command prompt and type "mongo" to enter the shell
type "use vidly" to use that db
type
db.users.insert(
{
"name":"Tom Hanks",
"email":"[email protected]",
"password":"234242"
})
Now youve inserted and created a new collections called "users" with one object
Go to vidly-api-node folder and open routes/users.js file
insert this code to top after all the const declarations
router.get("/", async (req, res) => {
const users = await User.find();
res.send(users);
});
restart node using the "node index.js" command
use postman and do a test call to
http://localhost:3900/api/users
It works.
Dear Mosh, your tutorials are awesome, can you please fix this so people can finish them and recommend you even more around the world. Thank you.
The text was updated successfully, but these errors were encountered: