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

Next.js framework guide for worker is outdated and does not work. #18936

Open
t0m0120 opened this issue Dec 26, 2024 · 2 comments · May be fixed by #18946
Open

Next.js framework guide for worker is outdated and does not work. #18936

t0m0120 opened this issue Dec 26, 2024 · 2 comments · May be fixed by #18946
Assignees
Labels
content:edit Request for content edits documentation Documentation edits product:workers Related to Workers product

Comments

@t0m0120
Copy link

t0m0120 commented Dec 26, 2024

Existing documentation URL(s)

https://developers.cloudflare.com/workers/frameworks/framework-guides/nextjs/

What changes are you suggesting?

The Existing Next.js apps item is out of date and does not work.
Update the content to align with the OpenNext documentation.

wrangler.toml

- main = ".worker-next/index.mjs"
+ main = ".open-next/worker.js"
name = "my-app"
compatibility_date = "2024-09-23"
compatibility_flags = ["nodejs_compat"]
- assets = { directory = ".worker-next/assets", binding = "ASSETS" }
+ assets = { directory = ".open-next/assets", binding = "ASSETS" }

package.json

- "build:worker": "cloudflare",
+ "build:worker": "opennextjs-cloudflare",
"dev:worker": "wrangler dev --port 8771",
"preview:worker": "npm run build:worker && npm run dev:worker",
"deploy:worker": "npm run build:worker && wrangler deploy"

Additional information

No response

@t0m0120 t0m0120 added content:edit Request for content edits documentation Documentation edits labels Dec 26, 2024
@github-actions github-actions bot added the product:workers Related to Workers product label Dec 26, 2024
@dario-piotrowicz
Copy link
Member

dario-piotrowicz commented Dec 27, 2024

Hi @t0m0120, thanks a lot for flagging the outdated guide! 🫶

We've made some breaking changes in our open-next adapter (without a major bump since it's still in beta) and forgot to update the guide here as well as the respective C3 template (which I am addressing in cloudflare/workers-sdk#7638).

@t0m0120
Copy link
Author

t0m0120 commented Dec 27, 2024

@dario-piotrowicz
Thanks for the confirmation and correction 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content:edit Request for content edits documentation Documentation edits product:workers Related to Workers product
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants