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

Restart seems to be incompatible with --debug node option and npm run #199

Open
jcollum opened this issue Oct 14, 2016 · 0 comments
Open

Comments

@jcollum
Copy link

jcollum commented Oct 14, 2016

Building a Hapi.js API. I'd like supervisor to restart the process with --debug via my package.json:

"debug": "./node_modules/.bin/gulp transpile &&  node --max-old-space-size=8192  --inspect --debug=5567 dist/index.js  | ./node_modules/.bin/bunyan -o short",
 "watch": "./node_modules/.bin/supervisor --RV -s -e coffee,yaml  --watch src,config -x npm  -- run debug"

Ideally I'd run npm run watch and it would run the npm run debug script. Works fine -- once. After it restarts all it will do is attempt to start then hit an error and restart (loop):

Unable to open devtools socket: address already in use

If I take off the --inspect call I get this error:

Error: listen EADDRINUSE :::5567

Even with no --debug flag at all I still get an error on restart but this time it's in the Hapi API:

  "code": "EADDRINUSE",
  "errno": "EADDRINUSE",
  "syscall": "listen",
  "address": "0.0.0.0",
  "port": 5566

Adding in -k to the supervisor call doesn't work. I don't have anything listening to SIGTERM.

I'm trying to keep all my runs scripts in package.json, so adding a new gulp task is something I'd like to avoid.

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

1 participant