Repository navigation
Add support for AsyncLocalStorage (nodejs_als) on Oxygen
#4054
RATIU5
started this conversation in
Ideas + Feature Requests
Replies: 1 comment
|
Update: ALS works on Oxygen when
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Feature request: add support
AsyncLocalStorage(nodejs_als) on OxygenVersions:
@shopify/mini-oxygen4.2.2,@shopify/hydrogen2026.10.0-preview.3,@shopify/cli3.xContext
Follow-up to #3828, where it was confirmed that ALS isn't available in Oxygen production. The Hydrogen developer preview now targets any framework, but several of them need
AsyncLocalStoragefor request scoping:@solidjs/web/storageimportsnode:async_hooksunconditionally, so the worker fails to start@tanstack/start-storage-contextandstart-server-coreimport itnodejs_compatToday these either can't deploy to Oxygen or need unofficial workarounds, like needing to alias framework internals.
Request
I think any of these would help, in order of my preference:
nodejs_alscompatibility flag on Oxygen (ALS only, a small surface I presume)oxygen.jsonalongsidecompatibility_date, with MiniOxygen reading the same config so dev and prod match (as suggested in Shopify hydrogen dev fails to load app entry with No such module "node:async_hooks" when using Sentry (@sentry/cloudflare) #3828)node:*built-ins or compatibility flagsRepro
A worker containing
import { AsyncLocalStorage } from 'node:async_hooks', run withcreateMiniOxygen({ workers: [{ modules: true, scriptPath }] }), fails withUnable to resolve ... "node:async_hooks". It runs withcompatibilityFlags: ['nodejs_als'].Is ALS support on the roadmap? Happy to test a preview.
All reactions