file:app.ts
code:
if (cluster.isPrimary) {
cluster.fork()
}else{
console.log("start")
}
The above code is run with the command: node-ts app.ts. It works well.
But if you debug it through vscode and start it with cluster.fork(). node-ts will report an error:
Unknown or unexpected option:--inspect-port
I tried to modify the source code: \node_modules\ts-node\node_modules\arg\index.js
Add continue on line 87;
Delete: const err = new Error(' Unknown or unexpected option: ${originalArgName} ');
The program can run normally.
I think this problem needs to be fixed. Because node-ts can run in a variety of programs. Then other programs may have additional options that we have no control over.
I want to add an option: Turn on the option to ignore unknown items
file:app.ts
code:
if (cluster.isPrimary) {
cluster.fork()
}else{
console.log("start")
}
The above code is run with the command: node-ts app.ts. It works well.
But if you debug it through vscode and start it with cluster.fork(). node-ts will report an error:
Unknown or unexpected option:--inspect-port
I tried to modify the source code: \node_modules\ts-node\node_modules\arg\index.js
Add continue on line 87;
Delete: const err = new Error(' Unknown or unexpected option: ${originalArgName} ');
The program can run normally.
I think this problem needs to be fixed. Because node-ts can run in a variety of programs. Then other programs may have additional options that we have no control over.
I want to add an option: Turn on the option to ignore unknown items