Skip to content

πŸ› Bug Report: Community self-hosted dashboard fails to bundle / renders blank after Clerk v6 upgrade β€” missing Show, ClerkLoaded, and useAuth().isLoaded in self-hosted shimΒ #11355

@prathapbelli

Description

@prathapbelli

πŸ“œ Description

The Clerk v6 upgrade (PR #11210, commit 2271475) added and component usage across the dashboard, and introduced a useAuth().isLoaded gate in
apps/dashboard/src/routes/protected-route.tsx. The community self-hosted shim at apps/dashboard/src/utils/self-hosted/index.tsx β€” which Vite aliases in for @clerk/react when VITE_SELF_HOSTED=true &&
!IS_ENTERPRISE (see apps/dashboard/vite.config.ts, the isCommunitySelHosted branch) β€” was not updated to mirror those additions.
As a result, building or running the dashboard in community self-hosted mode is currently broken. Cloud and Enterprise (Better Auth) paths are not affected β€” they alias to different shims

πŸ‘Ÿ Reproduction steps

  1. Clone novuhq/novu at current next (commit 46c085e or later).
  2. nvm use 22.22.1
  3. cp apps/dashboard/.example.env apps/dashboard/.env
  4. In apps/dashboard/.env, set:
    - VITE_SELF_HOSTED=true
    - leave VITE_NOVU_ENTERPRISE=false
    - leave VITE_CLERK_PUBLISHABLE_KEY= empty
    - set VITE_API_HOSTNAME and VITE_WEBSOCKET_HOSTNAME to any self-hosted Novu API URL (reachable, with CORS allowing http://localhost:4201).
  5. pnpm install
  6. pnpm build:packages
  7. pnpm --filter @novu/maily-core build
  8. pnpm --filter @novu/dashboard dev
  9. Open http://localhost:4201/ in the browser.

πŸ‘ Expected behavior

  • The dashboard bundles cleanly.
    • When unauthenticated, the user is redirected to /auth/sign-in and sees the self-hosted email/password sign-in form.
    • After signing in, the workflow dashboard mounts and renders normally.

πŸ‘Ž Actual Behavior with Screenshots

esbuild bundle errors during dev server startup:
✘ [ERROR] No matching export in "src/utils/self-hosted/index.tsx" for import "Show"
src/utils/protect.tsx:1:9:
1 β”‚ import { Show } from '@clerk/react';
~~~~

✘ [ERROR] No matching export in "src/utils/self-hosted/index.tsx" for import "ClerkLoaded"
src/routes/root.tsx:1:9:
1 β”‚ import { ClerkLoaded } from '@clerk/react';
~~~~~~~~~~~

Show is also imported in src/routes/protected-route.tsx, src/routes/auth.tsx, and src/routes/onboarding.tsx β€” same failure.

If those two exports are stubbed locally (so the bundle succeeds), the page still renders blank β€”

stays empty, no console errors, no XHR calls fired. Root cause:

// apps/dashboard/src/routes/protected-route.tsx:15-19
const { isLoaded } = useAuth();
if (!isLoaded) return null;

The shim's AuthContextProvider value does not include isLoaded, so isLoaded is undefined β†’ falsy β†’ ProtectedRoute returns null forever.

Novu version

3.15.4

npm version

pnpm 11.0.9

node version

v22.22.1

πŸ“ƒ Provide any additional context for the Bug.

No response

πŸ‘€ Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find a similar issue

🏒 Have you read the Contributing Guidelines?

Are you willing to submit PR?

Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions