rvg
rvg
CDCloudflare Developers
Created by fs0x30 on 8/9/2023 in #workers-help
Wrangler R2 local emulation
😢 looks like it was nodejs version related, you can see more details on the pr above but downgrading my nodejs to an LTS version also makes it work
14 replies
CDCloudflare Developers
Created by fs0x30 on 8/9/2023 in #workers-help
Wrangler R2 local emulation
made a pr in https://github.com/cloudflare/miniflare/pull/654, lets see what the cf folks say
14 replies
CDCloudflare Developers
Created by fs0x30 on 8/9/2023 in #workers-help
Wrangler R2 local emulation
I traced it to
$ cat patches/miniflare+3.20230807.0.patch
diff --git a/node_modules/miniflare/dist/src/index.js b/node_modules/miniflare/dist/src/index.js
index 15b1ffe..fc0dca9 100644
--- a/node_modules/miniflare/dist/src/index.js
+++ b/node_modules/miniflare/dist/src/index.js
@@ -8656,7 +8656,7 @@ var R2Router = class extends Router {
valueSize,
metadata
);
- return encodeResult(result);
+ return encodeJSONResult(result);
} else if (metadata.method === "createMultipartUpload") {
const result = await gateway.createMultipartUpload(
metadata.object,
$ cat patches/miniflare+3.20230807.0.patch
diff --git a/node_modules/miniflare/dist/src/index.js b/node_modules/miniflare/dist/src/index.js
index 15b1ffe..fc0dca9 100644
--- a/node_modules/miniflare/dist/src/index.js
+++ b/node_modules/miniflare/dist/src/index.js
@@ -8656,7 +8656,7 @@ var R2Router = class extends Router {
valueSize,
metadata
);
- return encodeResult(result);
+ return encodeJSONResult(result);
} else if (metadata.method === "createMultipartUpload") {
const result = await gateway.createMultipartUpload(
metadata.object,
14 replies
CDCloudflare Developers
Created by fs0x30 on 8/9/2023 in #workers-help
Wrangler R2 local emulation
I'm experiencing this too, while it worked a while back. Looking at the issues more people seem to be running into this: - https://github.com/cloudflare/workers-sdk/issues/3688 - https://github.com/cloudflare/workers-sdk/issues/3679
14 replies