IIRC, Miniflare@>3 and onwards loses most of the local API
IIRC, Miniflare@>3 and onwards loses most of the local API
wrangler & workerd, rather than a full-blown emulator.wrangler/state/kv/<KV_BINDING>/... where I have seeded data for local testing, but that's with wrangler v2. Sure would be nice to have something similar for wrangler v3. My worker uses KV as a read-only DB (writing happens outside my worker), so I don't have way to get data into KV for testing unless I wrote something specific to do that, which is not the end of the world I suppose.
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.localhost IPv6 vs IPv4 changes in Node 18 from Node 16.wrangler dev src/main.ts --live-reload --local-protocol https --port 9999wrangler dev sessions running? Ideally restart your computer, but otherwise try pkill workerd.put promise never resolves?wranglerworkerd.wrangler/state/kv/<KV_BINDING>/...unstable_devworkerd/server/server.c++:2362: error: Uncaught exception: kj/async-io-unix.c++:186: disconnected: ::write(fd, buffer, size): Broken pipe
stack: 110129a83 110129e81 10f032246 10f0326b7 10f00e350 10f011530
workerd/server/server.c++:2274: error: exception = kj/async-io-unix.c++:186: disconnected: ::write(fd, buffer, size): Broken pipe
stack: 110129a83 110129e81 10f032246 10f0326b7 10f0011f0 10f0622d0 10e41ad30
[mf:inf] GET / 502 Bad Gateway (7ms)
✘ [ERROR] Error: Could not proxy request: Error: connect ECONNREFUSED ::1:3341[wrangler] Could not proxy request: TypeError: fetch failed npx wrangler pages dev -- npm startnode --dns-result-order=ipv4first node_modules/wrangler/bin/wrangler.js pages dev -- npm startworkerd/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>`.
*** Fatal uncaught kj::Exception: kj/async-io-unix.c++:945: failed: ::bind(sockfd, &addr.generic, addrlen): Address already in use; toString() = 127.0.0.1:9999
stack: 1021761bf 102175f57 1021737ef 100911083 100911244 10091194c 1008dc91f 1008e032b 1008e015f 1008e0147 1021ac0db 1021ac337 1021aaa8f 1021aa85f 1008d41ab 186ce7f27[dev]
ip = "127.0.0.1"
port = 9999
local_protocol = "https"wrangler dev src/main.ts --live-reload --local-protocol https --port 9999pkill workerdputexport default {
async fetch(request, env) {
process.env = env;
return await app.handle(env, request);
}
}