-
Today, my application suddenly stopped working in my local environment after running I'm getting the following stack trace:
My project deploys to Vercel, which is building correctly and the application is running in the cloud. Things I have tried without luck:
I have no idea what's happened here. But I can't get past this error now. Use node v16.14.2, npm 8.5.0. package.json
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I got this figured out. I was accessing an environment variable in Unfortunately the usage of just Additionally my other environments were correctly configured, adding to the mystery. Also my localhost seems to have ran for many weeks before this was triggered, also adding to the mystery. |
Beta Was this translation helpful? Give feedback.
-
I had the same error and I solved it by closing my terminal and stopping the yarn run dev and starting it again it worked. |
Beta Was this translation helpful? Give feedback.
I got this figured out. I was accessing an environment variable in
_app.tsx
. If the variable was not found, it was callingthrow "!apiKey"
.Unfortunately the usage of just
throw
resulted in_app.tsx
swallowing the error and reporting the destructuring error instead. Amazingly, if I change it tothrow new Error("!apiKey")
it's extremely easy to debug. Oy vey.Additionally my other environments were correctly configured, adding to the mystery. Also my localhost seems to have ran for many weeks before this was triggered, also adding to the mystery.