Hi,
I tried to remove nodemon for ts-node-dev, but I have a big issue.
When I run tsnd I randomly have an error that stop everything. It appears like 4 times on 5.
Using ts-node version 8.3.0, typescript version 3.5.3
[2019-08-19T22:25:13.454] [ERROR] [TSED] - { Error: UNKNOWN: unknown error, open 'C:/.../AppData/Local/Temp/.ts-nodeQpTu9Z/compiled\3593206440344747.req'
at Object.openSync (fs.js:443:3)
at Object.writeFileSync (fs.js:1194:35)
at compile (C:\...\AppData\Local\Temp\ts-node-dev-hook-3593206440344747.js:44:6)
at Module.m._compile (C:\...\AppData\Local\Temp\ts-node-dev-hook-3593206440344747.js:56:36)
at Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at require.extensions.(anonymous function) (C:\...\AppData\Local\Temp\ts-node-dev-hook-3593206440344747.js:58:14)
at Object.nodeDevHook [as .ts] (C:\...\node_modules\ts-node-dev\lib\hook.js:61:7)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
errno: -4094,
syscall: 'open',
code: 'UNKNOWN',
path:
'C:/.../AppData/Local/Temp/.ts-nodeQpTu9Z/compiled\\3593206440344747.req' }
Following the stacktrace I tried to delete all Temp/.ts-node* folders, then re-run tsnd, but nothing change.
My command:
"cross-env NODE_ENV=development tsnd ./src/index.ts --respawn --no-notify"
My tsconfig.json:
{
"compilerOptions": {
"target": "es2015",
"lib": [
"es2015",
"dom"
],
"typeRoots": [
"./node_modules/@types"
],
"outDir": "./dist",
"types": ["reflect-metadata"],
"module": "commonjs",
"moduleResolution": "node",
"experimentalDecorators":true,
"emitDecoratorMetadata": true,
"sourceMap": true,
"declaration": false,
"strict": true,
"esModuleInterop": true
},
"include": [
"src"
],
"exclude": [
"loadtest",
"node_modules"
]
}
Thanks for any help !
What nodejs version you are using?
I'm using node v10.16.2
Need a way to reporduce.
Any news on this?
I have the same problem with ts-node-dev.
Btw my dev team member does not have this problem with the same environment.
`> ts-node-dev --watch --respawn --transpile-only ./index.ts
Using ts-node version 8.10.2, typescript version 3.9.7
Compilation error in E:\src\graphql\resolvers\third-party\hubspot\index.ts
Compilation error in E:\src\utils\third-party\hubspot\hubspot.ts
Compilation error in E:\src\graphql\permissions\models\User.ts
Error: UNKNOWN: unknown error, open 'C:\Users\ruby\AppData\Local\Temp.ts-node3lpRvu\compiled\src_graphql_permissions_models_User_ts_ebfe34b3dabe664491c38c5aa472293ea8c16b9a7bb4a3a3534f1a91e50b5bc9.js'
at Object.openSync (fs.js:462:3)
at Object.writeFileSync (fs.js:1362:35)
Compilation error in E:\src\utils\third-party\hubspot\hubspot.ts
Compilation error in E:\src\graphql\permissions\models\User.ts
Error: UNKNOWN: unknown error, open 'C:\Users\ruby\AppData\Local\Temp.ts-node3lpRvu\compiled\src_graphql_permissions_models_User_ts_ebfe34b3dabe664491c38c5aa472293ea8c16b9a7bb4a3a3534f1a91e50b5bc9.js'
at Object.openSync (fs.js:462:3)
at Object.writeFileSync (fs.js:1362:35)
at writeCompiled (E:\node_modules\ts-node-dev\lib\compiler.js:302:10)
at Object.compile (E:\node_modules\ts-node-dev\lib\compiler.js:330:7)
at ChildProcess.
at ChildProcess.emit (events.js:327:22)
at emit (internal/child_process.js:876:12)
at processTicksAndRejections (internal/process/task_queues.js:85:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: ts-node-dev --watch --respawn --transpile-only ./index.ts
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ruby\AppData\Roaming\npm-cache_logs\2020-09-08T13_52_04_427Z-debug.log`
I also have same issue..please anyone help me