Deploy de API Node/Express

Parece que estoy teniendo problemas para avanzar con el despliegue en Vercel. Al intentar configurar y desplegar mi proyecto API en Node/Express, conectada a la BBDD Online en Railway, recibo el error: “Environment Variable ‘DB_HOST’ references Secret ‘db_host’, which does not exist.”

Esto ocurre incluso después de haber configurado las variables de entorno en la sección de configuración de mi proyecto. He intentado vincular el proyecto y también he eliminado el directorio .vercel, pero el problema persiste.

Repositorio: GitHub - JoseLuisGalvis/sanmartin-backend: API de la Web App Consultar San Martín

Proyecto: Login – Vercel

Quedo Atento a sus Orientaciones

Hey @joseluisgalvis. Most people here use English as a common language, so you’ll likely get more responses using that instead of Portuguese. I ran your original post through Google Translate so I could get an English version to share for increased visibility.

It seems that I am having problems moving forward with the deployment in Vercel. When trying to configure and launch my API project on Node/Express, connected to BBDD Online on Railway, I received the error: “Environment Variable ‘DB_HOST’ references Secret ‘db_host’, which does not exist.”

This occurs even after having configured the environment variables in the configuration section of my project. I tried to link the project and also deleted the .vercel directory, but the problem persists.

1 Like

Thanks for sharing the repository. I see the vercel.json uses the legacy env option. We actually recommend against using that. Instead, you should define environment variables in the Project Settings.

The error will go away if you remove the env section from the vercel.json file and move the variables to the Environment Variables section of your project’s settings.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.