How do you enable support for async local storage?

If I try to import node:async_hooks I get an error:
Are you trying to bundle for Node? [Obviously] You can use "platform: 'node'

  • My TOML has node_compat = true
  • The ALS docs don't say anything about prerequisites to support ALS
  • platform is not a documented config property that I can see
  • This page says I can enable ALS by adding compatibility_flags = [ "nodejs_als" ] in the TOML but that raises the error _"No such compatibility flag: nodejsals"
Was this page helpful?