MERN-SocialMedia-ZAINKEEPSCODE
MERN-SocialMedia-ZAINKEEPSCODE copied to clipboard
CastError: Cast to ObjectId failed for value "undefined" (type string) at path "_id" for model "Users" at ObjectId.cast (C:\Users\Lenovo\OneDrive\Desktop\mern-chat-app\server\node_modules\mongoose\lib\schema\objectid.js:248:11) at SchemaType.applySetters (C:\Users\Lenovo\OneDrive\Desktop\mern-chat-app\server\node_modules\mongoose\lib\schematype.js:1202:12) at SchemaType.castForQuery (C:\Users\Lenovo\OneDrive\Desktop\mern-chat-app\server\node_modules\mongoose\lib\schematype.js:1613:15) at cast (C:\Users\Lenovo\OneDrive\Desktop\mern-chat-app\server\node_modules\mongoose\lib\cast.js:348:32) at Query.cast...
bcrypt.compare() Shows "data and hash arguments required" while testing the loginUser in Controller
` export const loginUser = async(req,res)=>{ const {username,password} = req.body; try { const user = UserModel.findOne({username:username}) if(user) { const validity = await bcrypt.compare(password,user.password) validity? res.status(200).json(user): res.status(400).json("Wrong Password") } else {...
Good afternoon, sorry to bother you, I'm your subscriber and I'm learning from your video on "Full Stack MERN Social Media App Tutorial | React Node.js full Course for Beginners...
WARNING in ./node_modules/timeago.js/esm/register.js Module Warning (from ./node_modules/source-map-loader/dist/cjs.js): Failed to parse source map from '/home/alphalyte/Documents/serviced/Vibe/client/node_modules/timeago.js/src/register.ts' file: Error: ENOENT: no such file or directory, open '/home/alphalyte/Documents/serviced/Vibe/client/node_modules/timeago.js/src/register.ts' @ ./node_modules/timeago.js/esm/index.js 7:0-38 8:0-8 9:0-8 12:0-20...