Issue description
Initially I had a following setup for forking a child process (neighbour '.ts' file) using ts-node:
import {fork} from 'child_process'
...
const workerPath = path.join(__dirname, '..', 'workers', 'calculate')
const process = fork(workerPath)
process.on('message', response => {
console.log('response', response)
})
process.send({hello: 'world'})
The worker file has ts extension in development and js in production.
The worker file has been returning also a response to the main process (it is a single number).
However, after switching to ts-node-dev, I started to receive another response back from the child process:
{
"compile": "/Users/username/work/project/admin/api/src/workers/calculate.ts",
"compiledPath": "/var/folders/4d/t2sjr3s93j3bvm8c6vjm26sm0000gp/T/.…280e6bb65d555c3a57ce68c5110f7a14a9dbfad584ac45.js
}
and the actual worker file is not executed.
Is anything that I'm doing wrong?
I'm launching my application with the following command:
PORT=4000 ts-node-dev -r tsconfig-paths/register --watch api --project ./api/tsconfig.json ./api/src
Context
OS version (is it docker or host?), ts-node-dev version
MacOS BigSur 11.6
ts-node-dev: 1.1.8
Did you try to run with ts-node?
Yes, it works correctly with ts-node.
Did you try to run with --files option enabled?
Yes, nothing changed.
Did you try to run with --debug option enabled?
Yes, nothing changed.
Do you have a repro example (git repo) with simple steps to reproduce your problem?
Issue description
Initially I had a following setup for forking a child process (neighbour '.ts' file) using
ts-node:The worker file has
tsextension in development andjsin production.The worker file has been returning also a response to the main process (it is a single number).
However, after switching to
ts-node-dev, I started to receive another response back from the child process:and the actual worker file is not executed.
Is anything that I'm doing wrong?
I'm launching my application with the following command:
Context
OS version (is it docker or host?), ts-node-dev version
MacOS BigSur 11.6
ts-node-dev: 1.1.8
Did you try to run with ts-node?
Yes, it works correctly with ts-node.
Did you try to run with
--filesoption enabled?Yes, nothing changed.
Did you try to run with
--debugoption enabled?Yes, nothing changed.
Do you have a repro example (git repo) with simple steps to reproduce your problem?