You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I used patch-package to patch @clerk/nextjs@6.36.2 for the project I'm working on.
When building with Next.js 16.1.0-canary.21 and Turbopack enabled, the build fails because formatMetadataHeaders in keyless-custom-headers.js is not recognized as an async function. Making it async resolves the issue.
Here is the diff that solved my problem:
diff --git a/node_modules/@clerk/nextjs/dist/esm/server/keyless-custom-headers.js b/node_modules/@clerk/nextjs/dist/esm/server/keyless-custom-headers.js
index 11ccc7a..8994dad 100644
--- a/node_modules/@clerk/nextjs/dist/esm/server/keyless-custom-headers.js+++ b/node_modules/@clerk/nextjs/dist/esm/server/keyless-custom-headers.js@@ -67,7 +67,7 @@ function getNextVersion() {
return void 0;
}
}
-function formatMetadataHeaders(metadata) {+async function formatMetadataHeaders(metadata) {
const headers2 = new Headers();
if (metadata.nodeVersion) {
headers2.set("Clerk-Node-Version", metadata.nodeVersion);