Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodemon restart with 'rs' not working #121

Closed
pimvanderheijden opened this issue Aug 23, 2017 · 7 comments
Closed

Nodemon restart with 'rs' not working #121

pimvanderheijden opened this issue Aug 23, 2017 · 7 comments

Comments

@pimvanderheijden
Copy link

Great module!

One issue though it seems.

When I start my create-react-app and express server with:

concurrently \"react-scripts start\" \"nodemon server/main.js\

Restarting the server with nodemon by typing rs doesn't work anymore. I tried starting concurrently in reversed order bu no avail.

Any ideas?

concurrently: ^3.5.0
nodemon: ^1.11.0

@gustavohenke
Copy link
Member

Unfortunately, concurrently does nothing to the processes' stdin.
That's why typing rs won't work - it's never sent to the nodemon process!

@pimvanderheijden
Copy link
Author

I'll see if I can manage to make a PR and post here if I'll start working on it.

@SaarLevy
Copy link

I would also have loved to see this feature, but I guess the hassle this module saves is work typing in Ctrl +c + npm start

@pimvanderheijden
Copy link
Author

pimvanderheijden commented Oct 14, 2017 via email

pgraham added a commit to pgraham/concurrently that referenced this issue Jan 2, 2018
pgraham added a commit to pgraham/concurrently that referenced this issue Jan 2, 2018
@JaKXz JaKXz mentioned this issue Jan 11, 2018
@Jackclarify
Copy link

@pgraham https://github.com/kimmobrunfeldt/concurrently/pull/128, this pr works without '-r'(--row), concurrently -k -r "ng build -w -dop=false" "gulp run-dev",it throw error:

C:\pj\node_modules\concurrently\src\main.js:305
            target.stdin.write(line);
                        ^

TypeError: Cannot read property 'write' of null
    at Socket.process.stdin.on (C:\pj\node_modules\concurrently\src\main.js:305:25)
    at emitOne (events.js:115:13)
    at Socket.emit (events.js:210:7)
    at addChunk (_stream_readable.js:266:12)
    at readableAddChunk (_stream_readable.js:253:11)
    at Socket.Readable.push (_stream_readable.js:211:10)
    at Pipe.onread (net.js:585:20)
npm ERR! code ELIFECYCLE

https://github.com/kimmobrunfeldt/concurrently/issues/115, this answer solve my question.

gustavohenke pushed a commit that referenced this issue Apr 23, 2018
* Log output on stderr of child processes in functional tests. Helps with debugging programmer errors

* Add handling for input, allowing input to be directed to any of the child processes. (#121)
@gustavohenke
Copy link
Member

Released, finally 🙌 install v3.6.0 now to get this and other goodness!

@demisx
Copy link

demisx commented Jun 22, 2018

I am running the latest 3.6.0 and node 10.4.1. Have this npm script that launches a few watch jobs in parallel:

$ concurrently --raw 'npm run watch:build' 'npm run watch:apidoc' 'npm run watch:test:unit' 'npm run watch:server'`

The watch mode starts fine for all. However typing "rs" to restart nodemon and hitting "Enter" (or simply hitting "Enter") started to crash with the same type of error and leaving npm/node zombie processes behind that I need to kill manually:

TypeError: Cannot read property 'write' of null
    at ReadStream.process.stdin.on (/Users/dmoore/projects/api/node_modules/concurrently/src/main.js:306:26)
    at ReadStream.emit (events.js:182:13)
    at addChunk (_stream_readable.js:283:12)
    at readableAddChunk (_stream_readable.js:264:11)
    at ReadStream.Readable.push (_stream_readable.js:219:10)
    at TTY.onread (net.js:635:20)
[dmoore (test-add-condition-to-relation)]$ rsevents.js:167
      throw er; // Unhandled 'error' event
      ^

Error: read EIO
    at TTY.onread (net.js:656:25)
Emitted 'error' event at:
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! api@0.1.0 watch:server: `nodemon --delay 1000ms './dist/index.js' --watch './dist' --ext 'js'`
npm ERR! Exit status 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants