Reputation: 39
I have added all the secret key and publishable key in .env.local as docs suggest in folderName/src in that I have added .env.local but still I am getting error
`
in layout.tsx I have
import { ClerkProvider } from '@clerk/nextjs' export const metadata = { title: {
default: 'Learning',
template: '%s |Learning' }, description: 'Generated by Next.js', }
export default function ProfileLayout({ children, }: { children: React.ReactNode }) { return (
<ClerkProvider >
<html lang="en">
<body>
<header style={{backgroundColor: 'floralwhite'}}>
<p>Header</p>
</header>
{children}
<footer><p>Footer</p></footer>
</body>
</html>
</ClerkProvider>
) }
`
Upvotes: 1
Views: 504
Reputation: 712
I got a similar error when deploying to AWS Amplify. I updated the environment variables in Amplify settings and updated my next.config.ts
as follows.
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* added the following line */
env: {
CLERK_SECRET_KEY: process.env.CLERK_SECRET_KEY
}
};
export default nextConfig;
Upvotes: 0