Skip to content

feat(create-cloudflare): add template for analog with cloudflare workers #8979

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

edmundhung
Copy link
Member

@edmundhung edmundhung commented Apr 16, 2025

Fixes #[insert GH or internal issue link(s)].

Pages template: https://1beb99a6.ancient-truth-85ba.pages.dev/
Workers template: https://lively-river-b5c4.devprod-playground.workers.dev/


  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because:
  • Wrangler / Vite E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because:
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because:
  • Wrangler V3 Backport
    • TODO (before merge)
    • Wrangler PR:
    • Not necessary because:

Copy link

changeset-bot bot commented Apr 16, 2025

⚠️ No Changeset found

Latest commit: 822a2fb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Apr 16, 2025
@workers-devprod workers-devprod added the c3-e2e Run c3 e2e tests on a PR label Apr 16, 2025
Copy link
Contributor

github-actions bot commented Apr 16, 2025

A Wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15145504380/npm-package-wrangler-8979
Prereleases for other packages:

cloudflare-workers-bindings-extension:

wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15145504380/npm-package-cloudflare-workers-bindings-extension-8979 -O ./cloudflare-workers-bindings-extension.0.0.0-v33e3dc4ce.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-v33e3dc4ce.vsix

create-cloudflare:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15145504380/npm-package-create-cloudflare-8979 --no-auto-update

@cloudflare/kv-asset-handler:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15145504380/npm-package-cloudflare-kv-asset-handler-8979

miniflare:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15145504380/npm-package-miniflare-8979

@cloudflare/pages-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15145504380/npm-package-cloudflare-pages-shared-8979

@cloudflare/unenv-preset:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15145504380/npm-package-cloudflare-unenv-preset-8979

@cloudflare/vite-plugin:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15145504380/npm-package-cloudflare-vite-plugin-8979

@cloudflare/vitest-pool-workers:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15145504380/npm-package-cloudflare-vitest-pool-workers-8979

@cloudflare/workers-editor-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15145504380/npm-package-cloudflare-workers-editor-shared-8979

@cloudflare/workers-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15145504380/npm-package-cloudflare-workers-shared-8979

@cloudflare/workflows-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/15145504380/npm-package-cloudflare-workflows-shared-8979

Note that these links will no longer work once the GitHub Actions artifact expires.

@edmundhung
Copy link
Member Author

Hi @brandonroberts, I am trying to fix the analog template on create-cloudflare. It is working fine locally with the pre-release build but crashes in the CI which seems to be related to the built files being empty (0kb) here: https://github.com/cloudflare/workers-sdk/actions/runs/14596934294/job/40945147138?pr=8979#step:6:1123

Just wonder if you have idea why and if there is anyway to debug the ng build command. Thanks in advance!

@brandonroberts
Copy link

Hey @edmundhung. I think the issue is in how the working directory is resolved for dependencies when creating the template application inside a pnpm workspace. So it doesn't find any dependencies when looking at the main.server.ts

@edmundhung
Copy link
Member Author

Thanks Brandon! I will give it another look next week.

@edmundhung edmundhung force-pushed the edmundhung/DEVX-1683 branch from 9a17230 to 46d0aa3 Compare May 15, 2025 14:54
@workers-devprod workers-devprod added the e2e Run wrangler + vite-plugin e2e tests on a PR label May 15, 2025
@edmundhung edmundhung force-pushed the edmundhung/DEVX-1683 branch 3 times, most recently from e770603 to 2d84cbc Compare May 19, 2025 09:08
@edmundhung edmundhung force-pushed the edmundhung/DEVX-1683 branch 2 times, most recently from 32c1039 to d3d1ece Compare May 20, 2025 16:53
@edmundhung edmundhung force-pushed the edmundhung/DEVX-1683 branch from d3d1ece to 87e4454 Compare May 20, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c3-e2e Run c3 e2e tests on a PR e2e Run wrangler + vite-plugin e2e tests on a PR
Projects
Status: Untriaged
Development

Successfully merging this pull request may close these issues.

4 participants