Skip to content

Add tutorials for cloudflare workers with wrangler#3055

Merged
bartlomieju merged 1 commit into
denoland:mainfrom
Tsukina-7mochi:main
Jun 1, 2026
Merged

Add tutorials for cloudflare workers with wrangler#3055
bartlomieju merged 1 commit into
denoland:mainfrom
Tsukina-7mochi:main

Conversation

@Tsukina-7mochi

Copy link
Copy Markdown

Add a tutorial on deploying to Cloudflare Workers using wrangler.

@fibibot fibibot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. A few blockers before this can land:

  1. Line 85: [esbuild tutorial](https://www.google.com/search?q=/examples/esbuild/) is a Google search URL — likely an LLM artifact. There's also no /examples/esbuild/ page in this repo. Either link to a real internal page or drop the sentence.
  2. The new page isn't registered in examples/_data.ts. The existing CF tutorial sits at line 557 (/examples/cloudflare_workers_tutorial/); add a sibling entry for /examples/cloudflare_workers_wrangler_tutorial/ so it shows in the sidebar.
  3. deno wrangler dev / deno wrangler types (tasks at lines 52–54) and deno --allow-env --allow-run wrangler deploy (line 51) aren't valid invocations — Deno has no wrangler subcommand. After deno add npm:wrangler, run it via deno run -A npm:wrangler dev (or use the binary that deno install exposes). Please fix these so a reader running deno task dev actually starts Wrangler.
  4. Line 76: satisfies ExportHandler<Env> — Cloudflare's exported type is ExportedHandler<Env> (with the "ed"). Can you confirm this compiles against the cf-typegen output?
  • nit: dev and start tasks (lines 52–53) are duplicates — pick one.
  • nit: title doesn't follow docs: ... lowercase format the repo uses, but maintainer can squash.

@Tsukina-7mochi

Copy link
Copy Markdown
Author

@fibibot
Thank you for taking the time to review this! I am very sorry that some paragraphs were overlooked during the process of translating my text into English.
I will request another review after making corrections based on the other points you mentioned. I am sorry, and thank you!

@fibibot fibibot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for confirming. The existing request-changes review still applies until a new commit updates the invalid Google link, the missing sidebar entry, the Wrangler command invocations, and ExportedHandler<Env> type; I’ll re-review the changed revision when it lands.

@lunadogbot lunadogbot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several examples on this page are not runnable yet, and the new tutorial is not wired into the examples navigation.

  1. "dev": "deno wrangler dev" / "cf-typegen": "deno wrangler types" use a nonexistent Deno subcommand; on Deno 2.7.14 this resolves wrangler as a local file and exits Module not found ".../wrangler". Use deno run -A npm:wrangler ... or document the node_modules/.bin path that makes the binary available.
  2. } satisfies ExportHandler<Env>; should be ExportedHandler<Env>; cf-typegen emits Cloudflare's ExportedHandler, so the copied sample will not type-check as written.
  3. [esbuild tutorial](https://www.google.com/search?q=/examples/esbuild/) is a search URL, and there is no /examples/esbuild/ page in this repo. Link to a real page or remove the sentence.
  4. /examples/cloudflare_workers_wrangler_tutorial/ is not added to examples/_data.ts, so the page will not show in the examples sidebar next to the existing Cloudflare Workers tutorial.

@fibibot fibibot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These blockers are still on the current head, so the previous request-changes review still applies.

  1. "dev": "deno wrangler dev" / "cf-typegen": "deno wrangler types" are not valid Deno invocations. On Deno 2.7.14, deno wrangler --version exits with Module not found ".../wrangler"; use deno run -A npm:wrangler ... or a documented installed binary path.
  2. } satisfies ExportHandler<Env>; should be Cloudflare's ExportedHandler<Env>; otherwise the copied sample will not type-check against the generated worker types.
  3. [esbuild tutorial](https://www.google.com/search?q=/examples/esbuild/) is a Google search URL, and this repo has no /examples/esbuild/ page. Link to a real page or remove the sentence.
  4. /examples/cloudflare_workers_wrangler_tutorial/ is not added to examples/_data.ts, so the page is not discoverable in the examples sidebar.

@fibibot fibibot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new commit changed the head SHA, but the earlier runnable-sample and navigation blockers are still present.

  1. "deploy": "deno --allow-env --allow-run wrangler deploy", "dev": "deno wrangler dev", and "cf-typegen": "deno wrangler types" are not valid Deno task invocations; deno wrangler looks for a local wrangler module. Use deno run -A npm:wrangler ... or document an installed binary path that exists after setup.
  2. } satisfies ExportHandler<Env>; should use Cloudflare's ExportedHandler<Env>, otherwise the sample will not type-check against the generated Worker types.
  3. [esbuild tutorial](https://www.google.com/search?q=/examples/esbuild/) is a Google search URL, and this repo has no /examples/esbuild/ page. Link to a real page or remove the sentence.
  4. /examples/cloudflare_workers_wrangler_tutorial/ is still not added to examples/_data.ts, so the new tutorial is not discoverable in the examples sidebar.

@Tsukina-7mochi

Copy link
Copy Markdown
Author

@fibibot Sorry for making confusion. I'm still on working on fixing those points and the SHA change was just a rebase to merge main branch. I'll notify you when fixed. Thank you!

@fibibot fibibot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. Since this was only a rebase and you are still working through the fixes, the existing request-changes review remains the current action item; I will re-review after the next fixing commit.

@bartlomieju bartlomieju left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@bartlomieju bartlomieju merged commit 5d52b9c into denoland:main Jun 1, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

4 participants