Skip to content

Commit 24dd397

Browse files
authored
fix(astro): fix async_hooks import for Cloudflare compatibility (#6287)
1 parent 241bbbd commit 24dd397

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/rotten-vans-leave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@clerk/astro": patch
3+
---
4+
5+
Fix `async_hooks` import for better Cloudflare compatibility.

packages/astro/src/async-local-storage.client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { AsyncLocalStorage } from 'async_hooks';
1+
import type { AsyncLocalStorage } from 'node:async_hooks';
22

33
const sharedAsyncLocalStorageNotAvailableError = new Error(
44
'Invariant: AsyncLocalStorage accessed in runtime where it is not available',

0 commit comments

Comments
 (0)