Title: astro pre-render error: Astro2.locals.auth is not a function · Issue #7613 · clerk/javascript · GitHub
Open Graph Title: astro pre-render error: Astro2.locals.auth is not a function · Issue #7613 · clerk/javascript
X Title: astro pre-render error: Astro2.locals.auth is not a function · Issue #7613 · clerk/javascript
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 hav...
Open Graph 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 ...
X 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 ...
Opengraph URL: https://github.com/clerk/javascript/issues/7613
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"astro pre-render error: Astro2.locals.auth is not a function","articleBody":"### Preliminary Checks\n\n- [x] I have reviewed the documentation: https://clerk.com/docs\n\n- [x] I have searched for existing issues: https://github.com/clerk/javascript/issues\n\n- [x] I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)\n\n- [x] 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.\n\n\n### Reproduction\n\nhttps://github.com/jphat/clerk-astro\n\n### Publishable key\n\npk_test_dXAtbWl0ZS01MS5jbGVyay5hY2NvdW50cy5kZXYk\n\n### Description\n\n**Steps to reproduce:**\n\n1. bun install\n2. bun run dev\n3. go to a pre-rendered blog page: http://localhost:4321/posts/post-1/\n\n**Expected behavior:**\n\nView blog page\n\n**Actual behavior:**\n\nwithout adding pre-render, I get this error\n`[WARN] [router] getStaticPaths() ignored in dynamic page /src/pages/posts/[...slug].astro. Add export const prerender = true; to prerender the page as static HTML during the build process`\n\nadding pre-render, I get this error\n`[ERROR] Astro2.locals.auth is not a function Stack trace: at /Users/josephat.1/Documents/Projects/clerk-astro-quickstart/node_modules/@clerk/astro/components/control/SignedOutSSR.astro:2:33 [...] See full stack trace in the browser, or rerun with --verbose.`\n\n\n### Environment\n\n```Shell\nSystem:\n OS: macOS 26.2\n CPU: (12) arm64 Apple M3 Pro\n Memory: 269.61 MB / 18.00 GB\n Shell: 5.9 - /bin/zsh\n Binaries:\n bun: 1.3.5 - /Users/.../.bun/bin/bun\n Browsers:\n Brave Browser: 144.1.86.139\n Chrome: 144.0.7559.60\n Edge: 143.0.3650.80\n Firefox: 147.0\n Safari: 26.2\n npmPackages:\n @astrojs/check: ^0.9.4 => 0.9.6 \n @astrojs/node: ^9.5.1 => 9.5.1 \n @clerk/astro: ^2.13.6 => 2.16.12 \n @types/bun: latest => 1.3.6 \n astro: ^5.14.1 => 5.16.9 \n prettier: ^3.6.2 => 3.8.0 \n prettier-plugin-astro: ^0.14.1 => 0.14.1 \n typescript: ^5.9.3 => 5.9.3\n```","author":{"url":"https://github.com/jphat","@type":"Person","name":"jphat"},"datePublished":"2026-01-16T19:06:00Z","url":"https://github.com/clerk/javascript/issues/7613"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4b645bf0-7d76-4747-9667-ea76c5665e2b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9CCE:32D628:122F004:18E5BCB:6AFB6DAD |
| html-safe-nonce | b72fbcf151babcde20190b8e31a7170d8135f8bbea16f800c9aaa5915400ef20 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Q0NFOjMyRDYyODoxMjJGMDA0OjE4RTVCQ0I6NkFGQjZEQUQiLCJ2aXNpdG9yX2lkIjoiMzUyMzQyNTQwMjg3NTUwNjA5MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3638951e8379154874f9b7250044d6d9ce43c4311e68368ade141ed7cb33a742 |
| hovercard-subject-tag | issue:3823250272 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/clerk/javascript/7613/issue_layout |
| twitter:image | https://opengraph.githubassets.com/64cc7b85c71955d5d15f81154aa9bbf13e2336f1bb63a809107cf7a18ee53242/clerk/javascript/issues/7613 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/64cc7b85c71955d5d15f81154aa9bbf13e2336f1bb63a809107cf7a18ee53242/clerk/javascript/issues/7613 |
| og:image:alt | 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 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jphat |
| hostname | github.com |
| expected-hostname | github.com |
| None | cca289ecd54650fcf3c0b037a58b97186dee2cc4406819d87fab93728fd83700 |
| turbo-cache-control | no-preview |
| go-import | github.com/clerk/javascript git https://github.com/clerk/javascript.git |
| octolytics-dimension-user_id | 49538330 |
| octolytics-dimension-user_login | clerk |
| octolytics-dimension-repository_id | 438331492 |
| octolytics-dimension-repository_nwo | clerk/javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 438331492 |
| octolytics-dimension-repository_network_root_nwo | clerk/javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 88808b1fae5ab8a526a73e7ce5542a10eb9d6971 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width