a year ago
I have a mongoDB instance and a Nextjs app.
I have a page that is server side and does a fetch to the mongodb instance and on build phase it throws the following error: getaddrinfo ENOTFOUND mongodb.railway.internal.
I added a 3 second timeout before the await mongoClient.connect(); but i still get the error.
ⓘ Deployment information is only viewable by project members and Railway employees.
4 Replies
a year ago
The 3 seconds is not needed anymore, we have fixed that issue.
However, the private network is not available during build.
a year ago
Noted, thanks for the quick response. I'll try to work around it from next
a year ago
In case anyone drops here, i solved it making a dynamic import of the component that connects to mongo so that it only renders when requested by client
Status changed to Solved brody • over 1 year ago