✘ [ERROR] Could not resolve "async_hooks"

351 views Asked by At

Gettiing eroor, asking to add "platform: 'node'". Can someone help me where to add it. project is > https://github.com/dicebear/api

$wrangler dev                                                                                                           1 ✘  65%   09:02:34 PM 
 ⛅️ wrangler 2.7.1
-------------------
▲ [WARNING] Enabling node.js compatibility mode for built-ins and globals. This is experimental and has serious tradeoffs. Please see https://github.com/ionic-team/rollup-plugin-node-polyfills/ for more details.


⬣ Listening at http://0.0.0.0:8787
- http://127.0.0.1:8787
- http://192.168.0.112:8787
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ [b] open a browser, [d] open Devtools, [l] turn on local mode, [c] clear console, [x] to exit                                                                                   │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

✘ [ERROR] Could not resolve "async_hooks"

    node_modules/fastify/lib/contentTypeParser.js:3:34:
      3 │ const { AsyncResource } = require('async_hooks')
        ╵                                   ~~~~~~~~~~~~~

  The package "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.


✘ [ERROR] Build failed with 1 error:

  node_modules/fastify/lib/contentTypeParser.js:3:34: ERROR: Could not resolve "async_hooks"

Gettiing eroor, asking to add "platform: 'node'". Can some one help me where to add it. project is > https://github.com/dicebear/api

0

There are 0 answers