-
Notifications
You must be signed in to change notification settings - Fork 435
Description
Preliminary Checks
-
I have reviewed the documentation: https://clerk.com/docs
-
I have searched for existing issues: https://github.com/clerk/javascript/issues
-
I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
-
This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Reproduction
http://github.com/clerk/clerk-astro-quickstart
Publishable key
pk_test_cHJvLWNvd2JpcmQtNTcuY2xlcmsuYWNjb3VudHMuZGV2JA
Description
PUBLIC_CLERK_PUBLISHABLE_KEY can't be read from the runtime environment, it is baked in when the astro app is built (tbh all of the variables starting with PUBLIC_ but I'm going to ignore those here)
Steps to reproduce:
- Set up your
.envwith valuesplaceholderfor each variable - Optional, you can leave them empty too - Run
pnpm build - Run
PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_cHJvLWNvd2JpcmQtNTcuY2xlcmsuYWNjb3VudHMuZGV2JA node dist/server/entry.mjs - Open the page (http://localhost:4321)
Expected behavior:
The server doesn't throw publishable key errors.
Actual behavior:
It does.
Environment
System:
OS: macOS 26.2
CPU: (12) arm64 Apple M4 Pro
Memory: 62.94 MB / 24.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.13.0 - /opt/homebrew/opt/node@24/bin/node
npm: 11.6.2 - /opt/homebrew/opt/node@24/bin/npm
pnpm: 10.28.1 - /opt/homebrew/opt/node@24/bin/pnpm
bun: 1.3.3 - /Users/attilagreguss/.bun/bin/bun
Browsers:
Chrome: 144.0.7559.133
Firefox: 147.0.2
Safari: 26.2
npmPackages:
@astrojs/check: ^0.9.6 => 0.9.6
@astrojs/node: ^9.5.2 => 9.5.2
@clerk/astro: ^2.16.17 => 2.16.17
astro: ^5.17.1 => 5.17.1
prettier: ^3.3.2 => 3.3.2
prettier-plugin-astro: ^0.14.0 => 0.14.0
typescript: ^5.5.3 => 5.5.3