Search code examples
javascriptnode.jsdiscorddiscord.jsnodemon

Unable to run 2 nodemon inspect programs at once


Background: running Ubuntu 19.10 on an Inspiron 560.

I have 2 different Discord bots that I need to run on the same computer (all my other throwaway machines have other uses currently and do not have the remaining power to run discord bots). I like using nodemon with inspect, as it helps catch a bunch of discord gateway errors, and I can auto restart after a crash. However, when running two bots with --inspect, nodemon kicks out the following error:

Starting inspector or 127.0.0.1:9229 failed: address already in use

How can I run two --inspects at the same time?


Solution

  • Use different addresses:

    --inspect=127.0.0.1:9228
    --inspect=127.0.0.1:9229