My go serverless functions used to work up until yesterday. Today with a new commit, during build it got this error saying nodejs v18 is depreciated. Then I changed nodejs version to v22 in settings. Now the functions are crashing because all environment variables are empty string “”
Environment variables must be accessible. Now it’s giving empty string “”
I tried logging all variables, all are now “”
https://api.openfiat.org/ public URL
Vercel.json -
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"github": {
"silent": true
},
"trailingSlash": false,
"rewrites": [
{
"source": "/(.*)",
"destination": "/api/vercel.go"
}
],
"functions": {
"api/*.go": {
"includeFiles": "secure-connect-openfiat-test.zip"
}
},
"regions": ["bom1"]
}
Golang script using the environment variables
log.Println("ACCESS_TOKEN_DURATION", os.Getenv("ACCESS_TOKEN_DURATION"))
log.Println("REFRESH_TOKEN_DURATION", os.Getenv("REFRESH_TOKEN_DURATION"))
log.Println("DB_MIGRATE_UP", os.Getenv("DB_MIGRATE_UP"))
Errors log
2025/11/21 14:16:22 ACCESS_TOKEN_DURATION
2025/11/21 14:16:22 REFRESH_TOKEN_DURATION
2025/11/21 14:16:22 can not parse ACCESS_TOKEN_DURATION time: invalid duration ""
2025/11/21 14:16:22 can not load config:time: invalid duration ""