turbo
turbo copied to clipboard
[turborepo] Vercel link pulls undefined `TURBO_RUN_SUMMARY` breaking turbo repo
What version of Turborepo are you using?
1.10.3
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Mac
Describe the Bug
When running build:
turbo run build
ERROR a value is required for '--summarize [<SUMMARIZE>]' but none was supplied
[possible values: true, false]
For more information, try '--help'.
This seems to happen because I use vercel link, which pulls down the env TURBO_RUN_SUMMARY. This defaults to undefined when pulled.
Expected Behavior
The build should continue
To Reproduce
In your local env file, include:
TURBO_RUN_SUMMARY=
run turbo build
Reproduction Repo
No response
@glitchyg can you post your build scripts from package json which includes vercel link ? I'm not able to reproduce an issue with vercel link and turbo build also working ok by itself
In our case vercel env pull .env.development began pulling TURBO_RUN_SUMMARY="" into the .env file - since yesterday, I think. This change required us to pass --summarize=false into every package.json script that runs turbo.
@glitchyg can you post your
buildscripts from package json which includesvercel link? I'm not able to reproduce an issue withvercel linkandturbo buildalso working ok by itself
Make sure that remove var is not defined in vercel for this to work
@klapec laid it out well.
It should also be noted a new issue has come up with what seems to be the same root cause.
ERROR a value is required for '--remote-only [<BOOL>]' but none was supplied
This is caused by TURBO_REMOTE_ONLY being pulled as an empty val if it is not defined
This is true if you use something like dotenv -e .vercel/.env -c development -- turbo run build to get turbo to play nicely with vc pull/vc dev.
Would at least be super helpful if the ERROR a value is required for… error messages at least specified it's only required because corresponding ENV vars were found. Or better yet ignore those ENV vars if they have null values.
We are experiencing the same issue. I noticed however that when using vercel link to pull to an env.local eg: vercel env pull .env.local the build does not error.
Unfortunately we do not want to start using env.local for non nextjs apps in our mono repo.
Still happening in April 2024.
So setting TURBO_RUN_SUMMARY= is somewhat a valid thing. We could make turbo default to false on empty string values, but we could also get vc env pull to not write blank values to the .env file. I'm not sure why it's doing that.
I honestly have no preference but I'd love to see this in prod soon, it shall be a quick fix. I'd personally prefer if the solution would lead to remove empty string values from being populate in the env file but that's personal preferences. Let me know if you need anything from me. Thanks for the quick reply @mehulkar 🙏
Note:
Having TURBO_REMOTE_ONLY="" or TURBO_REMOTE_ONLY= produce the exact same error. And it also happens for TURBO_RUN_SUMMARY.
I've just spent almost a week tracking this error down.
(1) Please fix the problem where prisma/turborepo cannot find/use the .env file in the root of the monorepo. The solutions to that problem that you'll find online is to use dotenv which causes this problem. (2) Please do something more sensible for this bug. (3) Please, seriously please, give us some better error messages, not even vercel support could figure this out! (4) It would be extra super-duper nice if we could get a singular document that describes getting prisma, in a monorepo, using turborepo, on vercel, with sveltekit to run. The existing documentation is "buggy".
Check the readme on https://github.com/thebjorn/vercel-mono-prisma for my adventures in creating the smallest test-case that would reproduce my original problem (this issue, case# 00218709 if you want to see the support log).
we could also get
vc env pullto not write blank values to the.envfile
[email protected] has a change in it that will prevent empty env vars from coming down when you vc env pull.
Let me know if this does not resolve the issue!