-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment variables not included after running adapter-node build using node build/index.js #7987
Comments
This works for me with your repro. Are you sure the environment variables are actually set in the application? If you run
the environment variable won't actually be passed down to the child process. You either need to use Also, if you are setting env vars with a |
Thank you for the swift feedback.
Could you explain that? In our production app we have a .env file set and the app doesn't seem to recognize it. |
We previously used dotenv, but have ditched that in favor of the new svelte env logic. |
Instead of running |
Thank you that was super helpful and exactly the information I needed. Much appreciated! |
The interesting thing is that while the dotenv will work for all other envs, for ORIGIN it will not. |
We'd need a specific reproduction for that. It doesn't make a lot of sense to me, because |
Describe the bug
When creating a project setting env vars and accessing them via $env/dynamic/private.
The env vars appear fine when running
npm run dev
and runningnpm run preview
after build, but are not accessible when running the app usingnode build/index.js
.I provided a minimal repo for reproduction.
Reproduction
https://github.com/xpluscal/svelte-env-test
Logs
No response
System Info
Severity
blocking all usage of SvelteKit
Additional Information
No response
The text was updated successfully, but these errors were encountered: