Description:
I am trying to run the Vendure Qwik storefront locally and connect it to my local Vendure server. However, despite setting the environment variable for the API URL in the .env file, the application continues to connect to the demo API at https://readonlydemo.vendure.io/shop-api.
Steps to Reproduce:
Clone the repository: git clone https://github.com/vendure-ecommerce/storefront-qwik-starter.git
Navigate to the project directory: cd storefront-qwik-starter
Observe that the application http://localhost:8080/ connects to the demo API instead of my local Vendure server.
Expected Behavior:
The application should connect to the local Vendure server as specified in the .env file.
Actual Behavior:
The application continues to connect to https://readonlydemo.vendure.io/shop-api.
Additional Information:
I have verified that the .env file is in the root directory and correctly formatted.
I have checked the vite.config.ts file to ensure it loads environment variables.
I have restarted the development server after making changes.
Environment:
Operating System: MacOS (M2 Max)
Node.js version: v22.4.1
npm version: 10.8.1
Please let me know if there are any additional steps I should take or if there is a known issue with environment variable handling in the current setup. Thank you!
You did the right steps but at the moment the application is using these constants
We should switch and use the environment variables. A PR is more than welcome.
Description: I am trying to run the Vendure Qwik storefront locally and connect it to my local Vendure server. However, despite setting the environment variable for the API URL in the
.env
file, the application continues to connect to the demo API athttps://readonlydemo.vendure.io/shop-api
.Steps to Reproduce:
git clone https://github.com/vendure-ecommerce/storefront-qwik-starter.git
cd storefront-qwik-starter
.env
file with the following content:npm run dev
Expected Behavior: The application should connect to the local Vendure server as specified in the
.env
file.Actual Behavior: The application continues to connect to
https://readonlydemo.vendure.io/shop-api
.Additional Information:
.env
file is in the root directory and correctly formatted.vite.config.ts
file to ensure it loads environment variables.Environment:
Please let me know if there are any additional steps I should take or if there is a known issue with environment variable handling in the current setup. Thank you!