I'm really los with what I'm missing here: > preview:worker > npm run build:worker && npm run dev:worker > build:worker > cloudflare sh: cloudflare: command not found Do I need to install something else?
I think it is not possible. You need to run two commands to be live in background, and the production environment requires to run only one command. You can run your hono API in a different service with a different subdomain.
Yes you can. With single dev or start command /api starts with Next.js app. So, you can use Hono framework inside Next.js api route. I have already tested this.
Am I correct in my assumption that: Any JavaScript that one could run as a function in a browser can be moved to a Cloudflare Worker instead? Or, only functions that do not modify the DOM within the function? I am an old, retired network manager who is looking into Cloudflare as a way to put some hobby webapps online for free. So, I only have a rudimentary knowledge of all this. Right now I am just trying to figure out the extent of what is possible.
I am running into an issue when running "preview:worker". I open the url and receive this error: "Error: The script will never generate a response. at async Object.fetch (urlToPath)". Any ideas?
project from pages, migrate to worker: npm run preview:worker And then "500 Internal Server Error" Error Msg: [wrangler:inf] GET / 500 Internal Server Error (121ms) [wrangler:inf] GET /_next/static/chunks/webpack-04c090bf27c652c8.js 200 OK (25ms) [wrangler:inf] GET /_next/static/chunks/framework-f66176bb897dc684.js 200 OK (24ms) [wrangler:inf] GET /_next/static/chunks/main-fa52bf13517a60fb.js 200 OK (7ms) [wrangler:inf] GET /_next/static/chunks/pages/_error-1be831200e60c5c0.js 200 OK (10ms) [wrangler:inf] GET /_next/static/chunks/pages/_app-6a626577ffa902a4.js 200 OK (14ms) [wrangler:inf] GET /_next/static/lQ3m2GaAmAulodIZ6KB0j/_ssgManifest.js 200 OK (12ms) [wrangler:inf] GET /_next/static/lQ3m2GaAmAulodIZ6KB0j/_buildManifest.js 200 OK (12ms)
would have loved a more indepth tutorial focused on next15 with server actions, route handlers, middleware setup etc.
One in-depth video coming up! 😄
- Confidence
@@CloudflareDevelopers Can't wait for it!
Hey Confidence! I know you from Appsmith several years ago. Good to see you with Cloudflare now brother
Whats the difference between deploying with Workers and deploy with Cloudflare Pages with next-on-pages?
I'm really los with what I'm missing here:
> preview:worker
> npm run build:worker && npm run dev:worker
> build:worker
> cloudflare
sh: cloudflare: command not found
Do I need to install something else?
The same thing happens to me, did you manage to solve it?
From what I saw in the documentation instead of Cloudflare, it is placed: openNextJS-Cloudflare
@@matiasportales5755 No I did not, sadly I gave up, not enough time.
Thanks for this update! Is it possible to use the Hono framework as the Next.js API (in the /api folder of Next.js) and deploy it on Cloudflare?
I think it is not possible. You need to run two commands to be live in background, and the production environment requires to run only one command. You can run your hono API in a different service with a different subdomain.
Yes you can. With single dev or start command /api starts with Next.js app. So, you can use Hono framework inside Next.js api route. I have already tested this.
Why you don't merge Pages and Workers services to be one?
You can now do everything you could do on Pages in Workers
- Confidence
@@CloudflareDevelopers awesome!
OpenNext does not support middleware yet. Can't use it in a production app without a middleware.
Hey can you help me with deploying the Dynamic routes to Cloudflare
Am I correct in my assumption that: Any JavaScript that one could run as a function in a browser can be moved to a Cloudflare Worker instead? Or, only functions that do not modify the DOM within the function?
I am an old, retired network manager who is looking into Cloudflare as a way to put some hobby webapps online for free. So, I only have a rudimentary knowledge of all this. Right now I am just trying to figure out the extent of what is possible.
Some Next14 apps display correctly but some Next15 or Next14 apps that use Convex don't work correctly :/
is this ready for production?
Potentially brilliant🎉 but how does it work with Next15 please?
This works fine on Next 15
- Confidence
@@CloudflareDevelopers I haven't been able to get it to work as not sure opennext is ready.....any advice welcomed, thanks Confidence
I am running into an issue when running "preview:worker". I open the url and receive this error: "Error: The script will never generate a response.
at async Object.fetch (urlToPath)". Any ideas?
Your Worker exceeded the size limit of 1 MiB.
Let's look into this. Are you on our Discord?
- Confidence
all deploy is html and js build not nextjs start
please add deploy feature for windows operating system.
You should be able to deploy just fine on Windows. What issues are you facing?
- Confidence
Does data streaming/Suspense work?
Still wondering this ☝
project from pages, migrate to worker:
npm run preview:worker
And then "500 Internal Server Error"
Error Msg:
[wrangler:inf] GET / 500 Internal Server Error (121ms)
[wrangler:inf] GET /_next/static/chunks/webpack-04c090bf27c652c8.js 200 OK (25ms)
[wrangler:inf] GET /_next/static/chunks/framework-f66176bb897dc684.js 200 OK (24ms)
[wrangler:inf] GET /_next/static/chunks/main-fa52bf13517a60fb.js 200 OK (7ms)
[wrangler:inf] GET /_next/static/chunks/pages/_error-1be831200e60c5c0.js 200 OK (10ms)
[wrangler:inf] GET /_next/static/chunks/pages/_app-6a626577ffa902a4.js 200 OK (14ms)
[wrangler:inf] GET /_next/static/lQ3m2GaAmAulodIZ6KB0j/_ssgManifest.js 200 OK (12ms)
[wrangler:inf] GET /_next/static/lQ3m2GaAmAulodIZ6KB0j/_buildManifest.js 200 OK (12ms)