const wt = require('node:worker_threads'); try{ setTimeout(function(){ let w = new wt.Worker("./workerFile.js"); }, 500); }catch(err){ console.log(err); }