π 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
- Clone novuhq/novu at current next (commit 46c085e or later).
- nvm use 22.22.1
- cp apps/dashboard/.example.env apps/dashboard/.env
- 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).
- pnpm install
- pnpm build:packages
- pnpm --filter @novu/maily-core build
- pnpm --filter @novu/dashboard dev
- 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?
π’ Have you read the Contributing Guidelines?
Are you willing to submit PR?
Yes I am willing to submit a PR!
π 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
- 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).
π Expected behavior
π 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 β
// 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?
π’ Have you read the Contributing Guidelines?
Are you willing to submit PR?
Yes I am willing to submit a PR!