Open simonzeiger opened 8 months ago
can you give a github repo as a reproduction so I can try and fix it there.
I added you to my repo here: https://github.com/simonzeiger/substring
Sometimes it just fails to get the an env variable from process.env, and sometimes it throws the missing identifier warning.
The failed env variable is coming from here: https://github.com/simonzeiger/substring/blob/main/src/api/database.ts#L9
first thing to fix is the top level "use server" in the game.ts file. that will keep the db out of the client. fixing this in #126
Are you saying that I should have one or I shouldn't? For some reason when I put one a the top of that game.ts, everything breaks. It seems a bit fragile of where I can and cannot put "use server" without things getting borked up.
Top level use server in game.ts gives me this error:
H3Error: undefined does not match field "body": BlockStatement of type FunctionExpression
Something going wrong in the transpilation/extraction step. I'm on vinxi 0.1.4
You will have to override @vinxi/plugin-directives to 0.1.2. In package JSON you can add an overrides field with this entry
Are you saying that I should have one or I shouldn't? For some reason when I put one a the top of that game.ts, everything breaks. It seems a bit fragile of where I can and cannot put "use server" without things getting borked up.
Yeah we are still finding and fixing all the edge cases and your issues are really helpful in that process
You will have to override @vinxi/plugin-directives to 0.1.2. In package JSON you can add an overrides field with this entry
This should be bumped in the next solid start version
After upgrading my Solid Start project's Vinxi from 0.0.59 -> 0.1.1, when I run
pnpm build
I getCannot access 'gr$1' before initialization
That identifier is coming from a a cache call, like:
export const getOtherPlayers = cache(gOP, "other-players");
gOP is the identifier failing. It is a server function. Perhaps the server function is missing from the client build? Or the server build?
Everything works with
pnpm dev
. When I build withssr: false
, this error happens during the prerender. stage of pnpm build. When I enablessr: true
, the error happens when I runnode .output/server/index.mjs