Skip to content

Cannot read properties of null (reading 'buckets') #9465

@zanhk

Description

@zanhk
|14:40:28.195||
|---|---|
|14:40:28.195|  Edits that have been made via the dashboard will be overridden by your local code and config.|
|14:40:28.195||
|14:40:28.195||
|14:40:28.196|? Would you like to continue?|
|14:40:28.196|🤖 Using fallback value in non-interactive context: yes|
|14:40:29.607|🌀 Building list of assets...|
|14:40:29.637|✨ Read 818 files from the assets directory /opt/buildhome/repo/dist|
|14:40:30.567|🌀 Starting asset upload...|
|14:40:31.471||
|14:40:31.472|✘ [ERROR] Cannot read properties of null (reading 'buckets')|

Hello, I m trying to build my astro app which works perfectly with pages, in workers instead I get the error:

✘ [ERROR] Cannot read properties of null (reading 'buckets')

at the step Deploying to Cloudflare's global network

which does not make clear of where the problem is.

wrangler.jsonc:

/**
 * For more details on how to configure Wrangler, refer to:
 * https://developers.cloudflare.com/workers/wrangler/configuration/
 */
{
	"$schema": "node_modules/wrangler/config-schema.json",
	"name": "insertadental-co-uk",
	"account_id": "xxx",
	"main": "./dist/_worker.js/index.js",
	"compatibility_date": "2025-05-31",
	"compatibility_flags": [
		"nodejs_compat",
		"global_fetch_strictly_public"
	],
	"assets": {
		"binding": "ASSETS",
		"directory": "./dist"
	},
	"observability": {
		"enabled": true
	},
	"vars": {
		"PUBLIC_STRIPE_KEY": "xxx",
		"BETTER_AUTH_URL": "xxx",
		"DB_ID": "xxx",
		"CLOUDFLARE_ACCOUNT_ID": "xxx",
		"NODE_VERSION": "22"
	},
	"d1_databases": [
		{
			"binding": "DB",
			"database_name": "inserta-dental",
			"database_id": "xxx"
		}
	],
	"kv_namespaces": [
		{
			"binding": "SESSION",
			"id": "a52dfd465a0a4ae389c5f6958f8e33bd"
		}
	],
	"r2_buckets": [
		{
			"binding": "R2",
			"bucket_name": "inserta-dental"
		}
	]
	/**
	 * Smart Placement
	 * Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
	 */
	// "placement": { "mode": "smart" },
	/**
	 * Bindings
	 * Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including
	 * databases, object storage, AI inference, real-time communication and more.
	 * https://developers.cloudflare.com/workers/runtime-apis/bindings/
	 */
	/**
	 * Environment Variables
	 * https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
	 */
	// "vars": { "MY_VARIABLE": "production_value" },
	/**
	 * Note: Use secrets to store sensitive data.
	 * https://developers.cloudflare.com/workers/configuration/secrets/
	 */
	/**
	 * Static Assets
	 * https://developers.cloudflare.com/workers/static-assets/binding/
	 */
	// "assets": { "directory": "./public/", "binding": "ASSETS" },
	/**
	 * Service Bindings (communicate between multiple Workers)
	 * https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
	 */
	// "services": [{ "binding": "MY_SERVICE", "service": "my-service" }]
}

Metadata

Metadata

Labels

internalRequires support from the Cloudflare Platform

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions