You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to load Worker from same directory in nodejs typescript
it always throws Error: Cannot find module
I tried to load using relative path and also by absolute path but it always failed
The text was updated successfully, but these errors were encountered:
Was literally about to post the same message...I have this:
import { Pool, spawn, Worker } from 'threads';
import * as w from './Worker';
export class EngineLearn {
trainModels = async () => {
const pool = Pool(() => spawn(new Worker('./Worker')));
// ...do stuff with pool
};
}
I am trying to load Worker from same directory in nodejs typescript
it always throws Error: Cannot find module
I tried to load using relative path and also by absolute path but it always failed
The text was updated successfully, but these errors were encountered: