Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions pages/cloudflare/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,23 @@ X [ERROR] Could not resolve "<package name>"
It might be because the package contains workerd specific code.

Check this [howto](/cloudflare/howtos/workerd) for a solution.

### `ReferenceError: FinalizationRegistry is not defined`

If you encounter this error when using features that rely on modern JavaScript APIs:

```text
✘ [ERROR] ⨯ ReferenceError: FinalizationRegistry is not defined
```

This error occurs because the `FinalizationRegistry` API is not available in older Cloudflare Workers compatibility dates.

To fix this issue, update your `compatibility_date` in `wrangler.toml` or `wrangler.jsonc` to `2025-05-05` or later:

```json
{
"compatibility_date": "2025-05-05"
}
```

Refer to the [Cloudflare Workers compatibility flags documentation](https://developers.cloudflare.com/workers/configuration/compatibility-flags/#enable-finalizationregistry-and-weakref) for more details.
Loading