Open hwrdtm opened 1 year ago
This is a behaviour of nodejs when async tasks are not completed or get hanged. There are quite a lot of async tasks, I'll look into this issue which one gets hanged.
But if you are blocked by this problem, as a workaround you can add to the end of someRandomScript.ts
:
// .. after your code runs:
process.exit() // this will stop the process ignoring any background pending async tasks if any
What
When I'm spawning a child process to run with the HRE, eg.
npx hardhat run someRandomScript.ts
, and with thehardhat-tracer
imported in thehardhat.config.ts
, I get a different behavior than without the tracer module imported. The different behavior is that, with the tracer imported, the child process does not exit.Steps To Reproduce
someRandomScript.ts
in a hardhat project:npx hardhat run scripts/thing.ts
console.log
Versions
hardhat@2.15.0
hardhat-tracer@2.5.1
node@18.15.0
yarn@1.22.19
Platform
Macbook Pro 2021 Chip: Apple M1 Pro OS: macOS Ventura 13.3