error: Missing API key. Pass it to the constructor `new Resend("re_123")

jordanHOBBY

8 months ago

Hi, I try to move my nextJS app, from Vercel to Railway.

But I have this error:
Error: Missing API key. Pass it to the constructor new Resend("re_123")

While having put the API key as a variable in the environment variable of Railway. I didn't have any problem with Vercel.

EDIT: I have the same problem for all my environments variables apparently

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

Solved

8 Replies

8 months ago

Are you perhaps using turbo?


jordanHOBBY

8 months ago

Thank you for your reply, but unfortunately we don't.


8 months ago

Took another look at your project and I only see a database?


jordanHOBBY

8 months ago

Sorry, I was trying to fix the problem by deleting the instance and importing back but I didn't manage to fix it. Now you should see the nextJS app again. Thank you.


jordanHOBBY

8 months ago

Btw I use a DockerFile, I tried using it with your prebuild docker instead, to see if it was a problem of my DockerFile, but I then have other errors.



jordanHOBBY

8 months ago

Thank you so much, I was missing the ARG


8 months ago

awesome!


Status changed to Solved brody 8 months ago