-
Notifications
You must be signed in to change notification settings - Fork 724
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
🐛 BUG: Workers with Static Assets Local Dev Error (npx wrangler dev
)
#7277
Comments
hi @flikteoh , thank you for raising this issue with us. When you created your Qwik project, did you follow the steps described in https://developers.cloudflare.com/workers/frameworks/framework-guides/qwik/? There are some subtle differences between scaffolding Pages + Frameworks projects vs Workers + Assets + Frameworks projects. Can you please have a look, and in case you haven't used that process, can you please try setting up a new Qwik project as per those instructions and let us know if you are still experiencing issues 🙏 ? |
Hey @CarmenPopoviciu, I have followed the steps described in the documentation multiple times by using existing project, and creating multiple new worker with assets projects (qwik, astro) and also tried the cloudflare pages approach with new pages project. For workers, it just expects there’s a _worker.js file during npx wrangler dev. But I assume it was suppose to work with Qwik’s dev server instead of product built files? Am I doing anything wrong? For pages project, I created new ones using Qwik, added the bindings for testing purposes and npx wrangler pages dev returns 404 in terminal and empty page. Thank you |
In the Qwik framework guide, I'm seeing that to start local dev the command to be run is |
Yes I did tried that too. It would just run the dev server for Qwik without the service binding locally. What I’m trying to achieve is to be able to run the qwik dev server locally with service bindings locally. There seems to be so documentation mix up:
What would be the correct script for the npm run dev? |
hi @flikteoh, ok, so I went ahead and followed the steps myself as per the guide I linked you, just so I can see what you see :). Everything in the guide is correct, except that running Can you please try one of these out and let me know if that fixed the issue for you? |
Hi @CarmenPopoviciu, I understand that running Does this mean that it is not possible to work directly with bindings locally via Here's the article from Cloudflare that I was referring to: https://blog.cloudflare.com/blazing-fast-development-with-full-stack-frameworks-and-cloudflare/ I’m trying to understand what is the correct steps, because I’ve tried creating new project using Astro template with same error. Normally when building locally with For example:
The above is run via Thank you |
Update: I actually found that running I also wanted to use Apart from these, I guess there may be also some issues with the adapter implementations in Qwik framework, specifically with Sorry for the time though! Do let me know if I should close this issue! |
No worries at all @flikteoh !! I saw your followup but didn't have time to reply just yet. Turns out you figured it out and I'm very glad it works for you now 🎉
As for the adapter implementations, indeed some things may not be supported just yet, as Framework support is somewhat experimental. The Workers with Assets feature itself is still in Thank you again for raising the issue with us, and really glad it worked out in the end. I'll go ahead and close this <3 |
Is the cache and cf object not working already via getPlatformProxy API or is it not yet supported in Workers with Assets? I was thinking it only needs to be implemented by the Qwik framework. Currently, cache api works when deployed just not in local dev server. |
It looks like we are not wiring up the cf property for Qwik right now: workers-sdk/packages/create-cloudflare/templates-experimental/qwik/c3.ts Lines 110 to 114 in c1022d6
|
And looks like Qwik still does not yet support cf: |
Thank you for the info @petebacondarwin |
Which Cloudflare product(s) does this pertain to?
C3 (npm create cloudflare), Workers Runtime, Wrangler
What version(s) of the tool(s) are you using?
3.87.0 [Wrangler], 2.32.1 [C3]
What version of Node are you using?
22.3.0
What operating system and version are you using?
macOs Sequoia 15.1
Describe the Bug
Observed behavior
Running
npx wrangler dev
causes error on both existing Qwik project and newly created Qwik project via C3.It was expecting the
_worker.js
file to have already been built.This seems to work for Pages via
npx wrangler pages dev
but not for workers with assetsnpx wrangler dev
. Is there planned support in the future?Update: the
npx wrangler pages dev
returns empty/404 pages for Qwik.Expected behavior
Be able to work with supported service bindings locally with Qwik framework via
npx wrangler dev
https://developers.cloudflare.com/workers/frameworks/framework-guides/qwik/
Steps to reproduce
npm create cloudflare@latest my-qwik-app -- --framework=qwik --experimental
cd my-qwik-app
npx wrangler dev
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
The text was updated successfully, but these errors were encountered: