Rubin Bhandari
Rubin Bhandari
``` ts // thread.ts import Piscina from 'piscina' import { resolve } from 'path'; const pool = new Piscina({ filename: resolve(__dirname, 'worker.ts') }); (async () => { console.log(await Promise.all([ pool.run({...
my tsconfig: ```json { "compilerOptions": { "module": "commonjs", "declaration": true, "lib": ["es2020"], "removeComments": true, "emitDecoratorMetadata": true, "esModuleInterop": true, "experimentalDecorators": true, "allowSyntheticDefaultImports": true, "target": "es2020", "moduleResolution": "node", "strictFunctionTypes": true, "sourceMap": false,...
Error: ``` Error: Cannot find module '/home/rubin/Desktop/Projects/backend/Nodejs/takeo/cit-be/dist/common/misc/worker.ts' imported from /home/rubin/Desktop/Projects/backend/Nodejs/takeo/cit-be/node_modules/.pnpm/[email protected]/node_modules/piscina/dist/src/worker.js at new NodeError (node:internal/errors:372:5) at finalizeResolution (node:internal/modules/esm/resolve:437:11) at moduleResolve (node:internal/modules/esm/resolve:1009:10) at defaultResolve (node:internal/modules/esm/resolve:1218:11) at ESMLoader.resolve (node:internal/modules/esm/loader:580:30) at ESMLoader.getModuleJob (node:internal/modules/esm/loader:294:18) at...
> > bump > > you need to pass path to worker JS file. you can use tsc for compile ts to js That doesnt seem to add up to...
That maybe problem in the api relating to typescript. Following the separate worker example but seems like you have to use JS extension which defeats the whole point of using...
I really do love piscinia with all the features it supports out of the box but sadly using it on TS seems to be a chore. I hope ts support...
> Will do so moving forward. 3.0.0 was major because we dropped support for Node.js 10 also any new features and fixes
more info on this
can i take this?