nestjs / nest

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀
https://nestjs.com
MIT License
66.9k stars 7.55k forks source link

Throws error upon resizing terminal window #595

Closed VRspace4 closed 6 years ago

VRspace4 commented 6 years ago

I'm submitting a...

[ ] Regression [x] Bug report [ ] Feature request [ ] Documentation issue or request [ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

When scaffolding a brand new nestjs project either from nest-cli or nestjs/typescript-starter, npm install, and npm run start works as expected. However, when the terminal window is simply resized (yes, resized), the process would consistently crash and produce the following error:

$ npm run start

> nest-typescript-starter@1.0.0 start C:\dev\temp\testnest2
> ts-node -r tsconfig-paths/register src/main.ts

[Nest] 158684   - 2018-4-23 15:40:49   [NestFactory] Starting Nest application...
[Nest] 158684   - 2018-4-23 15:40:49   [InstanceLoader] AppModule dependencies initialized +5ms
[Nest] 158684   - 2018-4-23 15:40:49   [RoutesResolver] AppController {/}: +44ms
[Nest] 158684   - 2018-4-23 15:40:49   [RouterExplorer] Mapped {/, GET} route +1ms
[Nest] 158684   - 2018-4-23 15:40:49   [NestApplication] Nest application successfully started +1ms
                                      internal/child_process.js:392
      throw errnoException(err, 'kill');
      ^

Error: kill ENOSYS
    at _errnoException (util.js:1024:11)
    at ChildProcess.kill (internal/child_process.js:392:13)
    at process.<anonymous> (C:\dev\temp\testnest2\node_modules\ts-node\dist\bin.js:54:93)
    at emitNone (events.js:106:13)
    at process.emit (events.js:208:7)
    at Signal.wrap.onsignal (internal/process.js:208:44)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nest-typescript-starter@1.0.0 start: `ts-node -r tsconfig-paths/register src/main.ts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nest-typescript-starter@1.0.0 start 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\xxx\AppData\Roaming\npm-cache\_logs\2018-04-23T22_40_55_016Z-debug.log

I've tested on ConEmu Bash, Command Prompt, and VS Code integrated terminal. They all exhibit the same issue.

Expected behavior

The nestjs process should continue to run and not be affected.

Minimal reproduction of the problem with instructions

Open a terminal:

$ git clone https://github.com/nestjs/typescript-starter
cd typescript-starter
npm install
npm run start

As soon as you resize the terminal window, the process crashes and produces the error specified above.

What is the motivation / use case for changing the behavior?

Environment


Nest version: 5.0.4

For Tooling issues:
- Node version: v8.9.3
- Platform:  Windows 10 Enteprise 2016 LTSB

Others:

shekohex commented 6 years ago

I think you should have a look at this issue since it seems that issue with ts-node not nestjs. Hope this helps

VRspace4 commented 6 years ago

I updated ts-node to the latest version and it appears to have solved it. Wonder if the latest version will cause any issues with nestjs.

Thank you for the tip!

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.