You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Astro v5.1.7
Node v22.13.0
System Linux (x64)
Package Manager npm
Output server
Adapter @astrojs/node
Integrations astro-icon
@astrojs/tailwind
@astrojs/vue
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
i defined a schema for some environment variables in the astro.config.mjs file.
When i run the project in dev mode, the import from the astro:env package works, for example like this:
import { API_URL } from 'astro:env/client'
But when i run the build and then start with
node ./dist/server/entry.mjs
the API_URL get's undefined, even there is the variable set in process.env
In the stackblitz example, you can just run:
npm run build
npm run start
to see the result.
What's the expected result?
The variables set with astro:env should not be undefined on production runtime.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
i defined a schema for some environment variables in the astro.config.mjs file.
When i run the project in dev mode, the import from the astro:env package works, for example like this:
import { API_URL } from 'astro:env/client'
But when i run the build and then start with
node ./dist/server/entry.mjs
the API_URL get's undefined, even there is the variable set in process.env
In the stackblitz example, you can just run:
to see the result.
What's the expected result?
The variables set with astro:env should not be undefined on production runtime.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-f34drayg?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: