psych
psych
CDCloudflare Developers
Created by psych on 12/9/2024 in #general-help
Beginner: Cannot connect to R2 via Worker
Hi everyone, I followed the tutorial https://developers.cloudflare.com/r2/api/workers/workers-api-usage/ and created a worker. While testing it, I am getting an error: message: "Cannot read properties of undefined (reading 'put')", exception: { stack: " at Object.fetch (index.js:971:30)", name: "TypeError", message: "Cannot read properties of undefined (reading 'put')", timestamp: 1733778270490, }, If I remove the R2 related code, it works properly. I have tried both locally and after deployment. From CLI, I created the bucket as shown in the tutorial. I can see both the bucket and worker from the dashboard.
5 replies