Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Clerk pageProps doesn't allow builds on vercel to work properly #59

Closed
jasonnoahchoi opened this issue Mar 12, 2023 · 4 comments
Closed

Comments

@jasonnoahchoi
Copy link

Describe the bug
I haven't investigated too much about why this is happening, but no matter what I was doing, the project runs fine locally, but I just couldn't get builds to work on vercel or if I run yarn build.

To Reproduce
Steps to reproduce the behavior:

  1. Pull down a fresh template/clone/project
  2. yarn
  3. setup postgres, clerk, etc and connect all ENV vars
  4. yarn build OR deploy to vercel
  5. check localhost:3000 or vercel, you'll get an internal error
  6. Undo code written in PR feature(ClerkAuthSSR): Enable and provide example of using SSR with Clerk #51 done by @roguealexander
  7. It works

Expected behavior
A clear and concise description of what you expected to happen.
I expect the page to render without an internal server error

Screenshots
If applicable, add screenshots to help explain your problem.
I believe the demo project is likely the same. I'm sure if you undo PR #51 cua-demo.vercel.app will render again.

Desktop (please complete the following information):

  • haven't checked

Smartphone (please complete the following information):

  • haven't checked
@AtlantisPleb
Copy link

AtlantisPleb commented Mar 13, 2023

Came here to make an issue for the following, but looks related to this - something wrong with Clerk getServerSideProps on the homepage?

On a fresh CUA via npx create-t3-universal-app, after setting up env variables, running yarn desktop fails with "pages with getServerSideProps can not be exported":

nextjs:dev:tauri: Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
nextjs:dev:tauri: Error: Error for page /: pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export
nextjs:dev:tauri:     at /Users/{...}/node_modules/next/dist/export/worker.js:245:23
nextjs:dev:tauri:     at async Span.traceAsyncFn (/Users/{...}/node_modules/next/dist/trace/trace.js:79:20)
nextjs:dev:tauri: info  - Exporting (8/8)
nextjs:dev:tauri: Error: Export encountered errors on following paths:
nextjs:dev:tauri:       /
nextjs:dev:tauri:     at /Users/{...}/node_modules/next/dist/export/index.js:409:19
nextjs:dev:tauri:     at processTicksAndRejections (node:internal/process/task_queues:96:5)
nextjs:dev:tauri:     at async Span.traceAsyncFn (/Users/{...}/next/dist/trace/trace.js:79:20)
nextjs:dev:tauri:        Error The "beforeDevCommand" terminated with a non-zero status code.

@chen-rn
Copy link
Owner

chen-rn commented Mar 16, 2023

I'm not too sure why getServerSideProps is breaking it in this case, if someone can make it work I'd love a PR! But for now I've reverted the PR that causes the issue!

@albbus-stack
Copy link
Collaborator

Came here to make an issue for the following, but looks related to this - something wrong with Clerk getServerSideProps on the homepage?

On a fresh CUA via npx create-t3-universal-app, after setting up env variables, running yarn desktop fails with "pages with getServerSideProps can not be exported":

nextjs:dev:tauri: Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
nextjs:dev:tauri: Error: Error for page /: pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export
nextjs:dev:tauri:     at /Users/{...}/node_modules/next/dist/export/worker.js:245:23
nextjs:dev:tauri:     at async Span.traceAsyncFn (/Users/{...}/node_modules/next/dist/trace/trace.js:79:20)
nextjs:dev:tauri: info  - Exporting (8/8)
nextjs:dev:tauri: Error: Export encountered errors on following paths:
nextjs:dev:tauri:       /
nextjs:dev:tauri:     at /Users/{...}/node_modules/next/dist/export/index.js:409:19
nextjs:dev:tauri:     at processTicksAndRejections (node:internal/process/task_queues:96:5)
nextjs:dev:tauri:     at async Span.traceAsyncFn (/Users/{...}/next/dist/trace/trace.js:79:20)
nextjs:dev:tauri:        Error The "beforeDevCommand" terminated with a non-zero status code.

I believe this is due to this commit. We should probably revert it since tauri doesn't support ssr. Try without any getServerSideProps in your codebase.

@albbus-stack
Copy link
Collaborator

I believe this issue is fixed by #61, reverting #51.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants