Unable to use Clerk with NextJS and Pages

Hey there, I just tried deploying my NextJS 15 app to pages and the page itself renders fine, but I am unable to use any sign-in button, as it will just result in me being redirected to "Internal server error" and this error message in my logs
"scriptName": "pages-worker--5456934-production",
"diagnosticsChannelEvents": [],
"exceptions": [],
"logs": [
{
"message": [
"TypeError: Cannot redefine property: __import_unsupported"
],
"level": "error",
"timestamp": 1741367414748
}
],
"scriptName": "pages-worker--5456934-production",
"diagnosticsChannelEvents": [],
"exceptions": [],
"logs": [
{
"message": [
"TypeError: Cannot redefine property: __import_unsupported"
],
"level": "error",
"timestamp": 1741367414748
}
],
Has anyone experienced something like this before? There are no errors in the local dev enviroment
No description
1 Reply
Val
Val2d ago
hey man im struggling with the same problem rn, did you end up figuring out how to make it work?

Did you find this page helpful?