webpack-dev-server can't find localhost
<p>I'm trying to get started with <strong>React</strong> using <strong>webpack</strong>, but keep running into an error when I try to set up <strong>webpack-dev-server</strong>. I ran </p>

<pre><code>npm install webpack-dev-server
</code></pre>

<p>followed by</p>

<pre><code>webpack-dev-server
</code></pre>

<p>and the command line returns the following:</p>

<pre><code>events.js:154
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo ENOTFOUND localhost
    at errnoException (dns.js:26:10)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:77:26)
</code></pre>

<p>Any clues on what is happening here?</p>

<p>I don't really know how webpack works to try and search for the root of the problem, but I've also been developing a website using PHP at port 80 with <strong>MAMP</strong>, I don't know if this is maybe part of the issue?</p>