Open Sanni-Damilola opened 1 month ago
Description: The
API_BASE_URL
environment variable is not being reflected when deploying to Vercel. This issue occurs because the environment variables have not been set on the Vercel server.Steps to Reproduce:
- Deploy the application to Vercel.
- Attempt to access any feature that relies on the
API_BASE_URL
environment variable.- Observe that the application fails to fetch data from the API, indicating that the
API_BASE_URL
is not set.Expected Behavior: The application should correctly use the
API_BASE_URL
environment variable and successfully fetch data from the API when deployed to Vercel.Actual Behavior: The application fails to fetch data from the API, suggesting that the
API_BASE_URL
environment variable is not set on the Vercel server.Solution: To resolve this issue, add the necessary environment variables on the Vercel server. Here’s how to set environment variables for Vercel:
For Vercel:
- Log in to your Vercel account and navigate to your project.
- Go to the "Settings" tab.
- In the "Environment Variables" section, click "Add".
Add a new key-value pair:
- Key:
API_BASE_URL
- Value:
the code in env.js
- Click the "Save" button.
Steps to Set Environment Variables on Vercel:
- Navigate to the Vercel dashboard and select your project.
- Click on the "Settings" tab in the left sidebar.
- Scroll down to the "Environment Variables" section.
- Click on the "Add" button to add a new environment variable.
- Enter
API_BASE_URL
as the key andthe code in env.js
as the value.- Click the "Save" button to save the environment variable.
After setting the environment variables on Vercel, redeploy your application to ensure the changes take effect.
Additional Information:
- Ensure that the
API_BASE_URL
is correctly defined in your.env
file for local development.- Verify that there are no typos in the key names when setting environment variables on Vercel.
🗒
Description: The
API_BASE_URL
environment variable is not being reflected when deploying to Vercel. This issue occurs because the environment variables have not been set on the Vercel server.Steps to Reproduce:
API_BASE_URL
environment variable.API_BASE_URL
is not set.Expected Behavior: The application should correctly use the
API_BASE_URL
environment variable and successfully fetch data from the API when deployed to Vercel.Actual Behavior: The application fails to fetch data from the API, suggesting that the
API_BASE_URL
environment variable is not set on the Vercel server.Solution: To resolve this issue, add the necessary environment variables on the Vercel server. Here’s how to set environment variables for Vercel:
For Vercel:
API_BASE_URL
the code in env.js
Steps to Set Environment Variables on Vercel:
API_BASE_URL
as the key andthe code in env.js
as the value.After setting the environment variables on Vercel, redeploy your application to ensure the changes take effect.
Additional Information:
API_BASE_URL
is correctly defined in your.env
file for local development.