Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,218,063 members, 8,036,469 topics. Date: Tuesday, 24 December 2024 at 05:57 PM |
Nairaland Forum / Science/Technology / Programming / I Have This Annoying Bug In Node Js For The Past 5 Days..help (1364 Views)
Learning React Js For Beginners / Building An API In Node.js And Taking It Live On A VPS / Issues With JS For Loops. Can Anyone Help Me Out? (2) (3) (4)
I Have This Annoying Bug In Node Js For The Past 5 Days..help by JSXyoungboy: 10:09pm On Mar 26, 2022 |
HI pls help me with the bug, anytime i send a post request to my server from my frontend, it says illegal agrument,undefined string. pls i need help its almost 1 week and no solution.
|
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by GardenOfGod(m): 10:19pm On Mar 26, 2022 |
Tech gurus over to you guys... |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by emetisuccess(m): 10:27pm On Mar 26, 2022 |
Head to stackoverflow for ur solution. How I wish it's PHP , would've helped u out. 2 Likes |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by Breadandpeppers(f): 10:32pm On Mar 26, 2022 |
Use anti bugging. |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by JSXyoungboy: 10:35pm On Mar 26, 2022 |
Breadandpeppers:How does that work ? |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by JSXyoungboy: 10:35pm On Mar 26, 2022 |
emetisuccess:I'm coming from there bro.its crazy im literally loosing my head over this. |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by Breadandpeppers(f): 10:38pm On Mar 26, 2022 |
JSXyoungboy:By spraying insecticide like mortein / baygon |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by JSXyoungboy: 10:41pm On Mar 26, 2022 |
Breadandpeppers:How can i use it ? |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by MeMiTi: 10:41pm On Mar 26, 2022 |
It seems it has to do with the bcrypt package. Confirm that password is not undefined. |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by falcon01: 10:45pm On Mar 26, 2022 |
Unfortunately I can't help, but I can feel your frustration |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by niel63(m): 10:52pm On Mar 26, 2022 |
Can you share your repo? Is it public? From the error log, e dey shout bcrypt! Hence, I'll suggest looking deep into the module and the argument type. Secondly, ensure your promise is settled so the fulfilled value of the promise will be regarded or treated as a return value... (an actual value) Since you say you don check SO, please share the repo link. Make we dey learn as we dey solve problems. |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by ReactJs(m): 11:05pm On Mar 26, 2022 |
It's pointing to line 21. const salt = await bcrypt.genSalt(10); const hashedPasssword = await bcrypt.hash(password, salt); https://www.npmjs.com/package/bcryptjs Please checkout their docs |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by von02: 11:31pm On Mar 26, 2022 |
ReactJs: Good evening sir As a newbie in backend development with nodejs, I've learnt concepts like routing. What more should I know Most of what will be needed when working as a backend end developer, not just routing. |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by richebony: 1:24am On Mar 27, 2022 |
Was your password field in your model class set this way? password: { type: String, select: false, }, setting a select attribute as false prevents passwords from being returned in the JSON response object so I think your password isn't returned from the query. You can try replacing that line with const existingUser = await User.findOne({ email }).select('+password'); or better still place a line break there and run on debug mode to monitor the returned values |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by Nickisindigo(m): 9:57am On Mar 27, 2022 |
von02: JavaScript mastery has a backend developer roadmap |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by pixey(m): 11:08am On Mar 27, 2022 |
I think it has to do with the bcrypt module. You did not handle it well. Exactly as ReactJs has pointed out. const salt = await bcrypt.genSalt(10); const hashedPasssword = await bcrypt.hash(password, salt); |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by ReactExpress: 3:49pm On Mar 28, 2022 |
JSXyoungboy: Do this Const hashPassword = bcrypt.hashSync(password, 10) That should hash the password correctly. |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by ricson11(m): 8:03pm On Mar 29, 2022 |
The problem is from bcrypt, what you did was wrong. You can just hash password like that |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by emetisuccess(m): 8:44pm On Mar 30, 2022 |
Have u been able to solve it?? |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by Solanaa: 1:24am On Apr 10, 2022 |
ReactJs: Boss Odogwu Igwe I hail you sir!! Would really love to start my coding journey |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by bularuz(m): 6:10pm On Apr 10, 2022 |
pixey: I believe you are right |
Re: I Have This Annoying Bug In Node Js For The Past 5 Days..help by pixey(m): 10:42pm On Apr 10, 2022 |
bularuz:He can also use crypto-js module. |
(1) (Reply)
Urgent: Interview (programmer) / Javafx For Gui Developer / What Programming Language Did You Learn First?
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 21 |