Skip to content

feat(nextjs): point missing-key errors at the Clerk CLI - #9481

Closed
djgould wants to merge 1 commit into
dg/keyless-cli-init-errorfrom
dg/prod-missing-keys-deploy-error
Closed

feat(nextjs): point missing-key errors at the Clerk CLI#9481
djgould wants to merge 1 commit into
dg/keyless-cli-init-errorfrom
dg/prod-missing-keys-deploy-error

Conversation

@djgould

@djgould djgould commented Aug 18, 2026

Copy link
Copy Markdown

Description

Follow-up to #9474 (stacked on it). Extends the CLI-first error messaging to production:

  • @clerk/shared: default missing publishableKey/secretKey messages now recommend npx clerk@latest init.
  • @clerk/nextjs: clerkMiddleware() with missing keys outside development now throws a deploy-oriented error recommending npx clerk@latest deploy, with npx clerk@latest env pull --instance prod as the already-deployed fallback (code=missing_env_keys_production).

Dev keeps the keyless init error from #9474; the shared init default covers non-Next SDKs.

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🌟 New feature

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8f00fc4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 23 packages
Name Type
@clerk/shared Patch
@clerk/nextjs Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/chrome-extension Patch
@clerk/clerk-js Patch
@clerk/electron Patch
@clerk/expo-passkeys Patch
@clerk/expo Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/headless Patch
@clerk/hono Patch
@clerk/localizations Patch
@clerk/msw Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/react Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/ui Patch
@clerk/vue Patch
@clerk/swingset Patch

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

@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview Aug 18, 2026 5:43pm
swingset Ready Ready Preview Aug 18, 2026 5:43pm

Request Review

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@djgould

djgould commented Aug 18, 2026

Copy link
Copy Markdown
Author

Superseded by #9485 — restacked fresh off main as part 2 of the keyless→CLI stack (#9484#9485#9486).

@djgould djgould closed this Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant