Developing a Gatsby App using this Starter https://github.com/the-road-to-react-with-firebase/react-gatsby-firebase-authentication
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.
error occurred while trying to proxy to: localhost:8000/
and this in the terminal:
error [HPM] Error occurred while trying to proxy request / from localhost:8000 to http://localhost:4000 (ECONNREFUSED
once I remove this from the
gatsby-config.js
file it works and the pages generated in the browser:
module.exports = {
developMiddleware: app => {
app.use(
proxy({
target: "http://localhost:4000",
})
)
},
}
However, I then get this error in the terminal:
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
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!!
Github Repo: