fix(react): Export named deriveFromSsrInitialState not found#7902
fix(react): Export named deriveFromSsrInitialState not found#7902
deriveFromSsrInitialState not found#7902Conversation
🦋 Changeset detectedLatest commit: 3185683 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@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: |
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughThis change consolidates two derive utilities into a single 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
deriveFromSsrInitialState not found
Description
Behavior is unchanged; only the way the shared package is used is simplified and no longer relies on the internal named exports that were missing in your runtime.
Cause:
The error happens when the app (e.g. on Vercel) loads
@clerk/shared/dist/runtime/deriveState.mjs. That file re-exports from an internal chunk (e.g.deriveState-xxxxxx.mjs). In some environments or with different build/publish setups, the named exportsderiveFromSsrInitialStateandderiveFromClientSideStatecan end up missing from the resolved module, which triggers the “Export named 'deriveFromSsrInitialState' not found” error.Fix:
useAuthBasewas updated to use only the publicderiveStateAPI from@clerk/shared/deriveStateinstead of the internal helpers, so the hook no longer depends on those named exports.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit
Refactor
Chores