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

Can you make this cloudflare pages compatible #1

Open
junioralive opened this issue Nov 24, 2024 · 3 comments
Open

Can you make this cloudflare pages compatible #1

junioralive opened this issue Nov 24, 2024 · 3 comments

Comments

@junioralive
Copy link

junioralive commented Nov 24, 2024

You can deploy Next.js apps on Cloudflare Pages, You can refer to this guide, which also includes a video tutorial. Cloudflare provides unlimited hosting for static sites, allowing your next application to run for free forever.

Thank you! Waiting for your response. I tried deploying, but there is an issue with watch.js.

@Amritanshu312
Copy link
Owner

I will review the watch.js page to identify the issue.

You can deploy Next.js apps on Cloudflare Pages, You can refer to this guide, which also includes a video tutorial. Cloudflare provides unlimited hosting for static sites, allowing your next application to run for free forever.

Thank you! Waiting for your response. I tried deploying, but there is an issue with watch.js.

I will review the watch.js page to identify the issue.

@junioralive
Copy link
Author

The problem is at the compilation of watch.js. It compiles only after we call a movie or TV show. For everything else everything works except for when we go to the player page where we receive this error below:

Error loading media. There was an error fetching the media data. Try again later.

I'm just relatively not to familiar with Next.js, and I was trying to work my way out; I just couldn't. Thanks for your help.

@Amritanshu312
Copy link
Owner

The problem is at the compilation of watch.js. It compiles only after we call a movie or TV show. For everything else everything works except for when we go to the player page where we receive this error below:

Error loading media. There was an error fetching the media data. Try again later.

I'm just relatively not to familiar with Next.js, and I was trying to work my way out; I just couldn't. Thanks for your help.

Cloudflare Pages primarily serves static sites and the logic in this code (useSearchParams, useEffect, etc.) relies on client-side rendering.

The line 'use client'; enforces client-side execution, but the deployment may not fully support it or fails to correctly hydrate the application on the client-side.

So, idk much about cloudfare but make sure Cloudflare supports Next.js' client-side rendering properly. If it doesn’t, consider moving your app to a platform with full Next.js support.

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

2 participants