ECONNREFUSED on serverside request to api
Unanswered
Sjoerd posted this in #help-forum
SjoerdOP
Hi everyone,
I have a NextJS frontend with a Rust REST API. Everything works like a charm in dev mode, but when I run in build mode, I get an error:
Error: connect ECONNREFUSED ::1:8080
I get this on getUser inside the UserService class (I added a screenshot of the function)
I think that the issue has something todo with the fact that I do this request in Layout.tsx (so on the NextJS serverside) because all other requests to the api go on the NextJS clientside and work fine.
I would really appreciate if someone could help me out!
I have a NextJS frontend with a Rust REST API. Everything works like a charm in dev mode, but when I run in build mode, I get an error:
Error: connect ECONNREFUSED ::1:8080
I get this on getUser inside the UserService class (I added a screenshot of the function)
I think that the issue has something todo with the fact that I do this request in Layout.tsx (so on the NextJS serverside) because all other requests to the api go on the NextJS clientside and work fine.
I would really appreciate if someone could help me out!