Hi, I'm trying to use a package that imports `node:async_hooks` inside of the custom entrypoint. How

Hi, I'm trying to use a package that imports
node:async_hooks
inside of the custom entrypoint. However, it errors out:
✘ [ERROR] Could not resolve "node:async_hooks"

      2 │ import { AsyncLocalStorage } from 'node:async_hooks';
        ╵                                   ~~~~~~~~~~~~~~~~~~

  The package "node:async_hooks" wasn't found on the file system but is built into node. Are you
  trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this
  error.


I don't think this is correct, as node:async_hooks should be available with nodejs_compat, right? Is this some issue on my end?
Was this page helpful?