Mmm I dont think so, I just cloned the repository form moshs github profile, but now that i think i solved this error before Cannot install dependencies for vidfly-api-node - #5 by rollingtatoo22
I’m trying to downgrade the mongo version but it is a little difficult jajaj
sorry i have not had time yet to try it. But, i think i tried changing the versions when i got the error and still didnt work, but honestly i was already giving up on it hhaahah, i will try again as soon as i can. Meanwhile, I hope you will find out
Well, for me it doesn’t work at all - I was using node v16.16.0, downgrade it to 4.8.7 and then I have different error when using node seed.js:
Strange thing is - I tried to install mongod version 5 and installation ends succesfully, but still mongod --version show me that I’m using version 6.0 o_O
I finally make it worked!!! So - I try to debug it with my coworker and the problem was moongose - according to this docs (Mongoose v6.5.2: MongoDB Version Compatibility) MongoDB with version 6.0 works with mongoose version ^6.5.0. I had version 5.* so this mongo client was not compatible with it. After upgrading mongoose to ^6.5.2 it finally works and I see in compass this vildy db
Hello, how can I update mongoose ? I’m searching for documentation but I can’t find anything. Sorry if the question is silly
No question is silly You can just use this in the vidly-ap-node folder:
npm install --save mongoose@6
Unfortunately this works only for letting me seed this file to my Mongo Compass app I still got new issue with using
node index.js But I try to consult it again.
Thankss, I already solve it, now we are in the same problem again jajajaj
Hey did you solve the other problem? if yes please tell me how
Verified with node 14.18.1.
Make the following changes:
rm -rf node_modules
Works for me - just to clear up: it’s rentals.js in routes folder (there’s similar file rental.js in models and I was confused for a few minutes :D).
That’s right. Updated!
thanks for ur answer. I did all the things you said.
i am able to run seed.js but when i want to run index.js it get this error:
‘SyntaxError: Invalid or unexpected token’
The quotes seem to be incorrect when it is copied from browser and directly pasted into vscode.
Correct the quotes as shown, and it should work.
thank u so much it finally worked!