m$
m$
Explore posts from servers
TTCTheo's Typesafe Cult
Created by m$ on 5/12/2023 in #questions
Any Clerk gurus in here? Following the Next.js 13 getting started guide renders blank screen
Following the getting started with nextjs guide for clerk renders a completely blank screen. I've followed it to a T, can't even set it up lmao. What am I doing wrong here? If I can't follow the getting started successfully then..... .env.local configuered with NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY and CLERK_SECRET_KEY src/app/page.tsx
//app/page.tsx
import { UserButton } from "@clerk/nextjs";

export default function Home() {
return (
<div>
<UserButton />
</div>
);
}
//app/page.tsx
import { UserButton } from "@clerk/nextjs";

export default function Home() {
return (
<div>
<UserButton />
</div>
);
}
./middleware.ts
import { authMiddleware } from "@clerk/nextjs";

export default authMiddleware();

export const config = {
matcher: ["/((?!.*\\..*|_next).*)", "/"],
};
import { authMiddleware } from "@clerk/nextjs";

export default authMiddleware();

export const config = {
matcher: ["/((?!.*\\..*|_next).*)", "/"],
};
src/app/layout.tsx
import "./globals.css";
import { Inter } from "next/font/google";
import { ClerkProvider } from "@clerk/nextjs";
const inter = Inter({ subsets: ["latin"] });

export const metadata = {
title: "Create Next App",
description: "Generated by create next app",
};

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<ClerkProvider>
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
</ClerkProvider>
);
}
import "./globals.css";
import { Inter } from "next/font/google";
import { ClerkProvider } from "@clerk/nextjs";
const inter = Inter({ subsets: ["latin"] });

export const metadata = {
title: "Create Next App",
description: "Generated by create next app",
};

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<ClerkProvider>
<html lang="en">
<body className={inter.className}>{children}</body>
</html>
</ClerkProvider>
);
}
15 replies