-
SummaryRecently migrated a manual monorepo to turbo repo, and when deploying, my environment variables aren't detected. I have tried passing the I can build the project successfully locally, but when deploying to Vercel, I keep getting a message (in this case from supabase-js) that my environment variable is missing. Any tips on getting this to work? I like the idea of the strict mode, but I'm out of ideas on how to make this work. Additional information# turbo.json
{
"$schema": "https://turbo.build/schema.json",
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": [".next/**", "!.next/cache/**", "dist/**"]
},
"lint": {
"dependsOn": ["^lint"]
},
"dev": {
"persistent": true,
"cache": false
},
"webhook:listen": {
"dependsOn": ["^webhook:listen"],
"persistent": true
},
"check-types": {
"dependsOn": ["^check-types"]
}
}
}
# apps/app-1/turbo.json
{
"extends": ["//"],
"globalPassThroughEnv": ["SUPABASE_URL"]
}
# apps/app-2/turbo.json
{
"extends": ["//"],
"globalPassThroughEnv": ["SUPABASE_URL"]
}
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Found the answer: In Vercel, had to update the build command to |
Beta Was this translation helpful? Give feedback.
Found the answer:
In Vercel, had to update the build command to
cd ../.. && turbo run build --filter=app-1
and usepassThroughEnv
in myturbo.json
for each apps.