feat(nextjs): throw missing-env error instead of keyless bootstrap - #9493
feat(nextjs): throw missing-env error instead of keyless bootstrap#9493djgould wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 92d8817 The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
0195511 to
3093159
Compare
bb7e2a9 to
d711cd8
Compare
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-google-signin
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
3093159 to
8a7793f
Compare
d711cd8 to
f41f7a7
Compare
8a7793f to
0cddd6d
Compare
f41f7a7 to
b0ade20
Compare
Squashed from the original four commits of this PR (bootstrap removal, import sort, adversarial-review findings, non-interactive CLI wording) during the simple-first stack reorder. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
b0ade20 to
92d8817
Compare
|
!snapshot |
|
Hey @djgould - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/astro@4.0.16-snapshot.v20260818213555 --save-exact
npm i @clerk/backend@3.16.9-snapshot.v20260818213555 --save-exact
npm i @clerk/chrome-extension@3.1.73-snapshot.v20260818213555 --save-exact
npm i @clerk/clerk-js@6.29.3-snapshot.v20260818213555 --save-exact
npm i @clerk/electron@0.0.34-snapshot.v20260818213555 --save-exact
npm i @clerk/electron-passkeys@0.0.4-snapshot.v20260818213555 --save-exact
npm i @clerk/eslint-plugin@0.2.1-snapshot.v20260818213555 --save-exact
npm i @clerk/expo@4.5.1-snapshot.v20260818213555 --save-exact
npm i @clerk/expo-google-signin@1.0.2-snapshot.v20260818213555 --save-exact
npm i @clerk/expo-passkeys@2.0.13-snapshot.v20260818213555 --save-exact
npm i @clerk/express@2.1.60-snapshot.v20260818213555 --save-exact
npm i @clerk/fastify@3.1.70-snapshot.v20260818213555 --save-exact
npm i @clerk/headless@0.0.27-snapshot.v20260818213555 --save-exact
npm i @clerk/hono@0.1.70-snapshot.v20260818213555 --save-exact
npm i @clerk/localizations@4.15.5-snapshot.v20260818213555 --save-exact
npm i @clerk/msw@0.0.63-snapshot.v20260818213555 --save-exact
npm i @clerk/nextjs@7.8.0-snapshot.v20260818213555 --save-exact
npm i @clerk/nuxt@3.0.12-snapshot.v20260818213555 --save-exact
npm i @clerk/react@6.14.5-snapshot.v20260818213555 --save-exact
npm i @clerk/react-router@3.6.14-snapshot.v20260818213555 --save-exact
npm i @clerk/shared@4.29.3-snapshot.v20260818213555 --save-exact
npm i @clerk/swingset@0.0.37-snapshot.v20260818213555 --save-exact
npm i @clerk/tanstack-react-start@1.5.5-snapshot.v20260818213555 --save-exact
npm i @clerk/testing@2.2.27-snapshot.v20260818213555 --save-exact
npm i @clerk/ui@1.30.5-snapshot.v20260818213555 --save-exact
npm i @clerk/upgrade@2.0.6-snapshot.v20260818213555 --save-exact
npm i @clerk/vue@2.4.31-snapshot.v20260818213555 --save-exact |
Description
Part 2 of the keyless→CLI stack (#9491 → #9493 → #9487 → #9488), stacked on #9491. This is the experiment/RFC piece: promote the CLI keyless flow over SDK keyless mode.
In development, when
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY/CLERK_SECRET_KEYare missing,@clerk/nextjsno longer provisions a keyless application. All bootstrap entry points now throw via the sharederrorThrowermissing-key messages, which (from #9491) direct tonpx clerk@latest initand state the command is non-interactive and requires no Clerk account or login (sandbox agent trials showed agents otherwise route around the CLI or invent placeholder keys). The error surfaces in both the dev server log and the dev error page. No nextjs-specific error constants are introduced.Since missing keys throw the same error in every environment, the
keylessMiddlewarewrapper reduced tobaseNextMiddlewareand is deleted.KeylessProvider(kept for the claimed-keys prompt) now uses read-onlyreadKeys()instead ofgetOrCreateKeys(), making "the SDK never mints applications" structural. Configured keys, claimed keys, and production behavior are unchanged.Squashed from the original four commits during the simple-first stack reorder. Supersedes #9474; #9492 was collapsed into #9491 + this PR.
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
🤖 Generated with Claude Code