Cloudflare Developers

CD

Cloudflare Developers

Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news

Join

There are no special instructions for

There are no special instructions for migrating from Wrangler v2 to v3. You should be able to update Wrangler by following the instructions in Install/Update Wrangler. You should experience no disruption to your workflow.
https://developers.cloudflare.com/workers/wrangler/migration/update-v2-to-v3/...

`wrangler pages dev` failing to start

I did it, but still have the issue.

Ah ok so it looks like the order you

Ah ok, so it looks like the order you call unstable_dev is important here. Moving const user = await unstable_dev(...) before const core = await unstable_dev(...) seems to work. Would you mind opening a GitHub issue for this? We're just starting a rewrite of wrangler dev's internals, and this is something we should consider. đź‘Ť

Hi i am developing a nextjs app and use

Hi, i am developing a nextjs app and use npx @cloudflare/next-on-pages@1 --watch and npx [email protected] pages dev .vercel/output/static --compatibility-date=2023-08-14 --live-reload --compatibility-flag=nodejs_compat in parallel. As soon as i edit a file that will be a function the recompiling leads to a crash of wrangler. Is there anything i did wrong?

hi im not sure if some release went

hi im not sure if some release went weird or I need to wait but i'm trying to install wrangler@latest and i'm getting Error: Expected "2023-08-14" but got "workerd 2023-08-01"

Wrangler Tree Shaking I m having trouble

Wrangler Tree Shaking: I'm having trouble with tree shaking my workers when I bundle via wrangler. Does this happen by default or do I have to enable it? When I run npx wrangler deploy --dry-run --outdir dist --minify=true or npx wrangler deploy --dry-run --outdir dist I can clearly identify dead code that isn't needed for the worker. I've set all my ts modules to "esnext", but still no good. I also don't see any way to adust the esbuild config. Any suggestions?

Hi đź‘‹ I am having an issue with

Hi đź‘‹ ! I am having an issue with wrangler tail that it always exits automatically after some time. Is it the expected behavior?? I didn't find any solution for this online.

`connect(): Connection refused` in Vitest setup file

i'm getting
workerd/util/symbolizer.c++:95: warning: Not symbolizing stack traces because $LLVM_SYMBOLIZER is not set. To symbolize stack traces, set $LLVM_SYMBOLIZER to the location of the llvm-symbolizer binary. When running tests under bazel, use `--test_env=LLVM_SYMBOLIZER=<path>`.
workerd/jsg/util.c++:277: info: exception = kj/async-io-unix.c++:1526: disconnected: connect(): Connection refused
workerd/util/symbolizer.c++:95: warning: Not symbolizing stack traces because $LLVM_SYMBOLIZER is not set. To symbolize stack traces, set $LLVM_SYMBOLIZER to the location of the llvm-symbolizer binary. When running tests under bazel, use `--test_env=LLVM_SYMBOLIZER=<path>`.
workerd/jsg/util.c++:277: info: exception = kj/async-io-unix.c++:1526: disconnected: connect(): Connection refused
...

I m using KV in a similar way and was

I'm using KV in a similar way and was struggling with this same topic and ended up using miniflare 2 for unit tests for the time being, because through that I was able to manipulate KV & R2. I have a few basic integration tests (checking some response statuses) set up with wrangler 3, but nothing very useful yet, because of inability to seed data (both KV and R2). I did notice that the unstable_dev API has bindings for KV etc. in the properties, but I guess they are not wired to anything yet. Would be great if they get wired up and some methods are exposed to allow seeding and manipulating data for testing purposes....

Hey there it doesn t seem possible to

Hey there, it doesn't seem possible to use unstable_dev and pass local: false in wrangler 3.x. Whatever I try, it will still default to local: true because the code checks for args.remote only. Which probably doesn't make sense given unstable_dev doesn't allow setting remote: true. Any idea?

damn i m gonna miss fs based KV it was

damn i'm gonna miss fs-based KV, it was so dead simple and easy to bootstrap

We are actively working on breakpoint

We are actively working on breakpoint debugging in v3. No ETA yet, but hopefully soontm

Curious if anyone here uses `unstable

Curious if anyone here uses unstable_dev from wrangler (v3). I'm running into an issue and I'm not sure whether I'm just doing something wrong, or it's a legitimate bug. When I try to enable bindings for both D1 and DO, the following error is thrown and it fails to start. However, if one is enabled and the other isn't, I don't encounter the error. ``` service core:user:worker: Uncaught TypeError: Class extends value undefined is not a constructor or null...

Has anyone here ever experienced issues

Has anyone here ever experienced issues with accessing a wrangler dev --experimental-local instance on a local network ip?

for clarity `unstable dev` is a wrapper

for clarity, unstable_dev is a wrapper around wrangler dev, so wrangler dev --local corresponds to local: true in unstable_dev

Hey there how do you access R2 bindings

Hey there, how do you access R2 bindings in unstable_dev local: true mode? It seems it's creating fake R2 bindings.

Hey there anyone using local false with

Hey there, anyone using local: false with unstable_dev? It currently hangs Jest (or any script I guess), even when you call worker.stop(). local: true doesn't have this issue.

Error: Could not proxy request: TypeError: fetch failed

I recently upgraded to wrangler 2.12.0 and started getting [pages:err] Error: Could not proxy request: TypeError: fetch failed error all of a sudden. I thought this is an issue with the new version and so downgraded to the version (2.9.1) which I was using earlier but issue still persists. Changed the port of vite dev server to make sure that the port number is not in use already but issue still remains. What could be the reason behind this issue?

and `jq` can extract super easily

and jq can extract super easily:
curl_prod accounts/:account/pages/projects/:pages-project/deployments -s | jq '.result[0].deployment_trigger.metadata.commit_hash
curl_prod accounts/:account/pages/projects/:pages-project/deployments -s | jq '.result[0].deployment_trigger.metadata.commit_hash
...

I m running into an `Authentication

I'm running into an Authentication error [code: 10000] error when executing wrangler dev @ 2.8.1 and I am wondering if I have the correct permission scopes to run the wrangler v2 dev command, can someone confirm if this is sufficient scoped permissions? - account (read) - user (read) - workers (write)...
No description