Mongo/Mongoose Error in "npm run start:api:dev"
[Nest] 17180 - 01/22/2024, 6:16:01 PM ERROR [ExceptionHandler] connect ECONNREFUSED 127.0.0.1:27017
MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017
at _handleConnectionErrors (/home/sid/code/novu/node_modules/.pnpm/[email protected]/node_modules/mongoose/lib/connection.js:805:11)
at NativeConnection.openUri (/home/sid/code/novu/node_modules/.pnpm/[email protected]/node_modules/mongoose/lib/connection.js:780:11)
23 Replies
System Info
Windows 10 Pro
WSL & Docker enabled.
Mongo install in windows
Redis install in WSL
Follow this doc https://docs.novu.co/community/windows-machine-setup
Project in linux filesytem & running using it.
Now i am installing project in windows file system
I doubted may be mongo is in windows & project in WSL may cause issue and to verify I setup one simple node & mongoose in both windows & WSL.
And its work well in both.
Question
Can i run mongo & redis in docker.
@Pawan Jain Can you please help?
@Sid, you just advanced to level 2!
Hey @Sid, Pawan is unavailable for the upcoming days. I will try to help you as much as I can 🙂
Can you please elaborate on what you are trying to accomplish so I can help you or provide more context to the team for additional assistance?
@Sid What is your Node version?
Thank emil
I have multiple node versions ,
18.18 and 20.10
I tried using both
I am setup project using 18.18
What about pnpm version?
Are you using latest next branch code?
I need to setup project locally for a contribution. I tried npn run start and api only commands both failed in share error
8.8.0
Yes, i guess I will pull one more time
Okay, meanwhile I will try to find an answer
Okay
I am also trying to set up a project using powershell.
Thank you for your help
One more thing
Question
Can i run mongo & redis in docker.
Yes, you can run MongoDB and Redis in Docker
Okay,
I asked because for Mac you suggest using homebrew.
Is there anything different with homebrew?
I have found this conversation:
https://discord.com/channels/895029566685462578/1125526392453468170
Can you please have a look at it?
Sure
Emil shared support regarding docker. I will try with docker later
And they mentioned mongo altas.
It is installed on my system
mongo compas*
@Zac Clifton can you help here mb?
@Sid Where you able to spin everything up from the docker compose files?
@Zac Clifton not yet, it will take some time to do.
@Sid, you just advanced to level 3!
Currently I am trying in the windows file system.
Can I use pnpm > 8.9.0.
Or 8.14
Got this https://cloud.nx.app/runs/7UeBhS4adZ after running from powershell
guys, can i use this doc for docker spin https://docs.novu.co/self-hosting-novu/deploy-with-docker
Yeah you should be able to
Okay, thanks @Zac Clifton