Skip to content

How to Set Umami Host & Id From Env Variable in Product Server (No SSR) #120

Answered by ijkml
elsell asked this question in Q&A
Discussion options

You must be logged in to vote
1. Run `nuxt build` in a session that does not have any environment variables set.

2. Run `node .output/server/index.mjs` in a session that _does_ have the Umami Host and ID env vars set.

Ah, I see the problem. The module inlines env variables (into runtimeConfig if proxy is enabled, else static file). And because Nuxt modules only run on build, the variables have to be present when you run nuxt build.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@ijkml
Comment options

@elsell
Comment options

@elsell
Comment options

@ijkml
Comment options

Answer selected by elsell
@elsell
Comment options

@ijkml
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants