I've been following the Quickstart Guide on the TBD developer website and am running into an issue during step "1. Instantiate Web5 and Create DID" where I try to console.log the DID I just created.
Rather than logging the DID, the node runtime exists early. If I use bun on the other hand, everything is working fine and I can see my DID on the terminal. The interesting part is that once I ran bun index.js I can switch back to node index.js to see the same result I saw after running bun index.js.
Not sure if this could be a race condition or has something to do with node itself.
I'm running @web5/api version 0.8.4. My Node.js version is 20.5.1 and my Bun version is 2.0.14.
FWIW: I can reproduce this on node 20.4.0, 20.5.0, 20.5.1, but not on 20.3.0 or before, or 20.6.0 or after. I recommend using the latest LTM release 20.11
I've been following the Quickstart Guide on the TBD developer website and am running into an issue during step "1. Instantiate Web5 and Create DID" where I try to
console.log
the DID I just created.Rather than logging the DID, the
node
runtime exists early. If I usebun
on the other hand, everything is working fine and I can see my DID on the terminal. The interesting part is that once I ranbun index.js
I can switch back tonode index.js
to see the same result I saw after runningbun index.js
.Not sure if this could be a race condition or has something to do with
node
itself.I'm running
@web5/api
version0.8.4
. My Node.js version is20.5.1
and my Bun version is2.0.14
.Here are the files I created:
Running
node index.js
returns early without logging anything. Runningbun index.js
logs the DID.