Next.js Discord

Discord Forum

Error: connect ECONNREFUSED

Unanswered
Lionhead posted this in #help-forum
Open in Discord
Avatar
LionheadOP
Hello! Please help to understand. Next 14 with App routing in the server Page.tsx file I try to get the data but I get an error. If I mark this file as "use client", the connection goes through and I receive data, but this is a server file, how can I connect without errors?
Image
Image

1 Reply

Avatar
LionheadOP
Just tried it and this error is triggered when I run through docker, but if I run "npm run dev" everything works fine. Does anyone know what I need to write in the docker file to make it work?