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
{{ message }}
This repository was archived by the owner on Dec 19, 2025. It is now read-only.
The app is not loaded when i require it in my main entry script.
I have 2 files:
server.ts - for running workers in cluster mode
app.ts - the file that serve the application data
Context
OS version (is it docker or host?), ts-node-dev version: Docker
Did you try to run with ts-node? : yes, it's working with ts-node
Did you try to run with --files option enabled? Yes
Did you try to run with --debug option enabled? Yes
Do you have a repro example (git repo) with simple steps to reproduce your problem?
constcluster=require("cluster");constnumCPUs=require("os").cpus().length;/** Initiate a Cluster */if(cluster.isMaster){console.log(`Master ${process.pid} is running`);// Fork worker processesfor(leti=0;i<numCPUs;i++){cluster.fork();}cluster.on("online",(worker)=>{console.log(`Worker ${worker.process.pid} is running`);});// Handle worker process exit and create a new onecluster.on("exit",(worker,code,signal)=>{console.log(`Worker ${worker.process.pid} died`);cluster.fork();});}else{require("./app");// this is not loaded}
Issue description
The app is not loaded when i require it in my main entry script.
I have 2 files:
Context
OS version (is it docker or host?), ts-node-dev version: Docker
Did you try to run with ts-node? : yes, it's working with ts-node
Did you try to run with
--filesoption enabled? YesDid you try to run with
--debugoption enabled? YesDo you have a repro example (git repo) with simple steps to reproduce your problem?
My cli command:
ts-node-dev --respawn --transpile-only -r tsconfig-paths/register src/server.ts
Debug log: