ts-node: Does not work after upgrading to 4.0.0
ts-node
just suddenly stop working after upgrading to 4.0.0 (The same with 4.0.1):
nodemon.json
{
"watch": ["src"],
"ext": "ts",
"ignore": ["src/**/*.spec.ts"],
"exec": "ts-node -P ./tsconfig.json --no-cache ./src/index.ts"
}
tsconfig.json
{
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
"sourceMap": true,
"lib": ["esnext"],
"outDir": "build",
"rootDir": "src",
"importHelpers": true,
"noEmitOnError": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"emitDecoratorMetadata": true
}
}
nodemon: 1.12.5 (dev dependency) typescirpt: 2.6.2 (dev dependency) ts-node: 4.0.1 (dev dependency)
Reverted ts-node back to 3.30 solved the problem.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 7
- Comments: 16 (10 by maintainers)
Commits related to this issue
- Disable detaching sub-process on Windows Fixes #480 — committed to stelcheck/ts-node by stelcheck 7 years ago
node v8.9.0 Win8.1x64
node -r ts-node/register
works for me.Interesting, thanks. I thought it may have been a duplicate of https://github.com/TypeStrong/ts-node/issues/481, but not if it’s on mac. Looks like these issues may be negative side effects of https://github.com/TypeStrong/ts-node/pull/419.
For anyone running into this, can you switch to using
node -r ts-node/register
? This avoids many of the process issues that were occurring and is likely the recommended way to use in the next release.Hi, i have the same problem when using ts-node >= 4.x.x. When i save a file, node process isn’t killed and both dev port and inspector port remains used. If i downgrade to 3.x.x, it starts working again. I use this npm scripts to start in dev mode:
"nodemon": "nodemon -e ts -w \"./src\" -x \"npm run debug\"",
"debug": "ts-node --inspect ./src/index.ts",