-
Notifications
You must be signed in to change notification settings - Fork 75
Error in the Github build check related to publishableKey and prerendering pages #86
Comments
I see this happening as well in my PR's CI. I'm trying to determine if this issue is resulting in failed Vercel builds (where the build just hangs). |
I am also having this issue, wondering if anyone has found any new information? |
I came across this thread while troubleshooting the same issue. I'm not using this repo template, but I am running a similar CI/CD pipeline. What I did to fix this was the following: Passed the
I moved the GitHub env vars into the build step instead. Based on the ci.yml in this repo, that would look like this:
Lastly, Hope this helps! |
I want to address some serious issues we are encountering in the production deployment of our solution based on Next.js, version "13.1.6". When attempting to access the page "/Admin", we encounter the following error: Error occurred prerendering page "/Admin". Read more: https://nextjs.org/docs/messages/prerender-error Error occurred prerendering page "/marketplace". Read more: https://nextjs.org/docs/messages/prerender-error _app.js We are deploying on vercel Upon further analysis, we have identified that the error lies in the absence of a publishableKey required by Clerk for the proper functioning of our application. This key is essential for authenticating and authorizing requests with Clerk. |
i use "@clerk/nextjs": "^5.1.4" and https://vercel.com/ step1: step2: step3: import { clerkMiddleware,createRouteMatcher } from "@clerk/nextjs/server";
export default clerkMiddleware((auth, request, event) => { export const config = { |
Hi @elias1991xNataly can you tell me how did you reach those settings? I'm having some issue finding this particular page based just on your screenshot. Any help would be appreciated! |
Hi folks, if you're trying to use a mock key as part of a build script (not prod), this is due to the key validation logic in Clerk, specifically You can bypass this by following their requirements:
So, just use the following publishable key: |
Describe the bug
I had an error in the Build, lint and type-check process. It says:
@acme/nextjs:build: Error: @clerk/nextjs: Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.
and@acme/nextjs:build: Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
(this error is for all the pages).I already have a
publishableKey
and it is being used as a ClerkProvider prop, so I don't understand the issue.To Reproduce
Steps to reproduce the behavior:
Logs
Additional context
I tried to print the publishableKey in the console.log, and it was correctly printed.
The text was updated successfully, but these errors were encountered: