BetaHuhn / deploy-to-vercel-action

🎬▲ Deploy your project to Vercel using GitHub Actions. Supports PR previews and GitHub deployments.
https://mxis.ch
MIT License
141 stars 71 forks source link

Error: undefinedVercel CLI 31.0.1 #367

Open wottpal opened 1 year ago

wottpal commented 1 year ago

Recently, we started getting this more occasionally (sometimes it works, sometimes it doesn't).

Screenshot 2023-07-09 at 09 57 56
evereq commented 1 year ago

Same issue: https://github.com/ever-co/ever-teams/actions/runs/5558865924/jobs/10154407173#step:6:17

UPDATE: we solved it by disabling the Build Cache in Vercel, see https://vercel.com/docs/concepts/deployments/troubleshoot-a-build#managing-build-cache. More specifically in the Vercel environment vars we added VERCEL_FORCE_NO_BUILD_CACHE and set it to 1.

MartinLupa commented 1 year ago

Same issue: https://github.com/ever-co/ever-teams/actions/runs/5558865924/jobs/10154407173#step:6:17

UPDATE: we solved it by disabling the Build Cache in Vercel, see https://vercel.com/docs/concepts/deployments/troubleshoot-a-build#managing-build-cache. More specifically in the Vercel environment vars we added VERCEL_FORCE_NO_BUILD_CACHE and set it to 1.

Could you confirm if this environment variable could be set via the BUILD_ENV or have you set it directly in Vercel?

evereq commented 1 year ago

@MartinLupa we set it directly in Vercel via UI

MartinLupa commented 1 year ago

This issue suddenly appeared again in our project, even after setting the mentioned environment variable. Is there any update on the possible solutions?

wottpal commented 12 months ago

@MartinLupa Yeah environment variable & making sure the committer's git identity email is set in his github profile should help.

psychobolt commented 8 months ago

I have FORCE: true set, this will avoid using build cache as well, however I think the main issue for me is manually running npx vercel build with the deploy action PREBUILT variable enabled. If the version of CLI is out of sync (build using latest, deploy using a older release), the undefined issue occur for next.js apps. Svelte apps seem to work ok. So I globally install vercel@latest, my workflow will use the same vercel CLI version for vercel build and deploy action. No more undefined issues for me.