WhatDidYouDoWithAILoading
Back to the forum
laptop and desk during deployment troubleshooting

学会 React 之后卡在部署

跟着模型学 React,开发正常,但 Vercel 因缺少环境变量失败了 6 次。

I used AI to learn React because I wanted to get past the blank-page stage fast. The components made sense in dev, state updates worked, and I could build a small dashboard without copying everything line by line. That part felt surprisingly smooth.

Then I tried to deploy to Vercel. It failed 6 times because I followed a stale setup the model had given me and missed one env variable. Locally everything worked, so I kept assuming the bug was in the build cache or some weird React version issue.

What burned time was not the app code but the deployment details: build commands, environment variables, and the difference between local `.env` files and platform settings. I kept re-running the same deploy, which was dumb, but the errors were vague enough to make that seem plausible.

After I finally found the missing variable, I realized I still don't know how to tell a fresh setup from an outdated one when the model sounds confident. Next time I'd check the platform docs first and treat the generated setup as a draft, not the source of truth.

5 replies

Ethan Li#1 · 2026-10-18

Was the missing env variable used at build time or runtime?

Nina West#2 · 2026-10-18

Build time. That was the annoying part, because local dev never exposed it.

Owen Park#3 · 2026-10-18

Been there. I learned React faster than I learned deployment, which feels backwards.

Tom Reed#4 · 2026-10-18

If Vercel fails repeatedly, compare the env list in dashboard vs local `.env` first. That catches a lot.

Olivia Sun#5 · 2026-10-18

This is why I don't trust generated setup steps without checking the platform docs.