s-panferov / awesome-typescript-loader

Awesome TypeScript loader for webpack
Other
2.35k stars 179 forks source link

node --inspect=0.0.0.0:9229 on express+HMR occurs "Starting inspector on 0.0.0.0:9229 failed: address already in use" #515

Open ghost opened 7 years ago

ghost commented 7 years ago

I'm using awesome-typescript-loader with express + webpack-dev-middleware + webpack-hot-middleware in Docker container and this cause app crash with this message Starting inspector on 0.0.0.0:9229 failed: address already in use.

This is because the checker process in checker.ts uses inherited args from the parent process. The parent process has the option --inspect=0.0.0.0:9229. So the forked child process will fail.

s-panferov commented 7 years ago

Hm, we should have a guard for this. https://github.com/s-panferov/awesome-typescript-loader/blob/master/src/checker/checker.ts#L152 do you use the latest version?

ghost commented 7 years ago

Yes. I am using

s-panferov commented 7 years ago

ah, you're using "0.0.0.0:9229" form. current implementation expected to work when only a port specified, like "--inspect=9229" or just "--inspect"