title: Gatsby error [HPM] Error occurred while trying to proxy request / from localhost:8000 to http://localhost:4000 (ECONNREFUSED)
body: <p>Developing a Gatsby App using this Starter 
  <a href="https://github.com/the-road-to-react-with-firebase/react-gatsby-firebase-authentication" rel="noreferrer">https://github.com/the-road-to-react-with-firebase/react-gatsby-firebase-authentication</a></p>
  
  <p>I keep getting this HPM Error after updated my node packages when I try to visit my page after running Gatsby Develop. The project compiles successfully but then I get this error in the browser and nothing shows up. </p>
  
  <blockquote>
    <p>error occurred while trying to proxy to: localhost:8000/</p>
  </blockquote>
  
  <p>and this in the terminal:</p>
  
  <blockquote>
    <p>error [HPM] Error occurred while trying to proxy request / from localhost:8000 to <a href="http://localhost:4000" rel="noreferrer">http://localhost:4000</a> (ECONNREFUSED</p>
  </blockquote>
  
  <p>once I remove this from the
  <code>gatsby-config.js</code> file it works and the pages generated in the browser:</p>
  
  <pre class="lang-js prettyprint-override"><code>module.exports = {
      developMiddleware: app =&gt; {
          app.use(
              proxy({
                  target: "http://localhost:4000",
              })
          )
      },
  }
  </code></pre>
  
  <p>However, I then get this error in the terminal:</p>
  
  <blockquote>
    <p>Error loading a result for the page query in "/404.html". The query was not run and no cached result was found.
    Page not found /404.html</p>
  </blockquote>
  
  <p>I want to know why isn't the Proxy working and what is the above module exports really doing anyway. I feel like this workaround I'm doing isn't good. Any help or advice would be great!!</p>
  
  <p>Github Repo: </p>
  
  <p><a href="https://github.com/thelovesmith/Island-Stream-Web-MVP" rel="noreferrer">GitHub Repo for The project</a></p>