Next.js Discord

Discord Forum

API route env error (pls help!)

Answered
Pond loach posted this in #help-forum
Open in Discord
Avatar
Pond loachOP
Getting this error on some api routes (not every time, very occasionally)
2023-11-14T18:42:01.723Z undefined INFO - info Loaded env from /var/task/.env

Running nextjs 13 on vercel
Image
Answered by Z4NR34L
Verify your env variables with you endpoint code, looks like not all are defined. Anyways this log is pretty not complete on Vercel, you can always try to pull env variables from vercel (https://vercel.com/docs/cli/env#unique-options) and reproduce the issue locally 😄
View full answer

8 Replies

Avatar
Verify your env variables with you endpoint code, looks like not all are defined. Anyways this log is pretty not complete on Vercel, you can always try to pull env variables from vercel (https://vercel.com/docs/cli/env#unique-options) and reproduce the issue locally 😄
Answer
Avatar
Pond loachOP
ty, trying this now
Avatar
Sure! Feel free to ping me when you still will have problems 😉
Avatar
Pond loachOP
do you have any clue about #Not able to scrape text (node fetch nor axios) with serverless function
Avatar
DIving into it 😉 Anyways, if you consider this case as closed please right click on message with solution and choose apps > mark solution
Avatar
Pond loachOP
will do
ty sir
Avatar
happy to help 😄