!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

207 Members
60 Servers

Load older messages


SenderMessageTime
21 Dec 2023
@peter-lustig:matrix.orgpeter-lustigthat does not work for the new version16:05:47
@lily:lily.flowersLily Foster shouldn't you be using dynamic instead of static then? 16:06:41
@lily:lily.flowersLily Fostersince you want runtime vars, not build-time vars?16:06:46
@lily:lily.flowersLily Foster(if i'm reading this doc right)16:06:52
@peter-lustig:matrix.orgpeter-lustigread what is ent16:07:06
@peter-lustig:matrix.orgpeter-lustigwhen i use dynamic i get an error16:07:11
@peter-lustig:matrix.orgpeter-lustigthat i shoul duse static16:07:15
@peter-lustig:matrix.orgpeter-lustigbecause of the prerendering16:07:20
@lily:lily.flowersLily Fosteroh, so you need real values during build time then?16:07:30
@lily:lily.flowersLily Fosterthat would be secrets baked in to your program :grimc16:07:38
@lily:lily.flowersLily Foster * that would be secrets baked in to your program 😬16:07:45
@lily:lily.flowersLily Fosterdo they have a better way to deal with secrets?16:08:03
@peter-lustig:matrix.orgpeter-lustigi will first test the fake values now16:08:03
@peter-lustig:matrix.orgpeter-lustigbecause what i really wonder is why npm run build works and nix build errors out16:08:14
@lily:lily.flowersLily Fosteri mean again, the fake values will let it build, but if it's baking them in, it won't work. you could put real values in there but then you'd have world-readable secrets16:08:26
@lily:lily.flowersLily Foster
In reply to @peter-lustig:matrix.org
because what i really wonder is why npm run build works and nix build errors out
there is no npm/nix difference here. the difference is you are baking in variables that you are making available in your local env but not in your build env
16:08:51
@lily:lily.flowersLily Foster
In reply to @peter-lustig:matrix.org
because what i really wonder is why npm run build works and nix build errors out
* there is no npm/nix difference here. the difference is you are baking in variables that you are making available in your local env but not in your nix build env
16:08:55
@lily:lily.flowersLily Fosterfrom what i can tell anyway16:09:10
@peter-lustig:matrix.orgpeter-lustig
In reply to @lily:lily.flowers
i mean again, the fake values will let it build, but if it's baking them in, it won't work. you could put real values in there but then you'd have world-readable secrets
for runtime i am passing the env variables via dotenv and command line arguments with agenix, so to be honest I just need to have it building
16:09:11
@peter-lustig:matrix.orgpeter-lustiglemme try the fake values16:09:26
@lily:lily.flowersLily Foster
In reply to @peter-lustig:matrix.org
for runtime i am passing the env variables via dotenv and command line arguments with agenix, so to be honest I just need to have it building
yeah but svelte explicitly says the values are baked in at build time. how would it be grabbing them at runtime if you don't have other code to do such?
16:09:46
@lily:lily.flowersLily Foster

If the user lands on a prerendered page, SvelteKit will request up-to-date values for $env/dynamic/public from the server (by default from a module called _env.js ...)

16:10:14
@lily:lily.flowersLily Fosterah16:10:15
@lily:lily.flowersLily Fosterthat sounds .... weird. but that does mean fake values might work?16:10:26
@peter-lustig:matrix.orgpeter-lustigI will try now xd16:10:37
@lily:lily.flowersLily Fosteri do hope it is that simple!16:11:21
@lily:lily.flowersLily Fosternot sure how many variables you have in the file, but you will likely need to define all of them16:11:46
@lily:lily.flowersLily Fosteri wonder why svelte doesn't have a way to say "this won't be needed at build time, just put a blank value in"16:12:02
@peter-lustig:matrix.orgpeter-lustigjust four16:12:08
@peter-lustig:matrix.orgpeter-lustig
In reply to @lily:lily.flowers
i wonder why svelte doesn't have a way to say "this won't be needed at build time, just put a blank value in"
idk maybe they do but not many people use sveltekit compared to react for example so finding stuff out is usually difficult
16:12:34

Show newer messages


Back to Room ListRoom Version: 6