Webpack Proxy - ECONNREFUSED for proxy to api

on a fresh “hello” project I get:
Error occurred while proxying request localhost:8080/api/v2/status to http://localhost:8000/ [ECONNREFUSED]

on the webpack server in a development environment. The canisters run fine on the replica and if I go directly to the replica i.e “localhost:8000/api/v2/status” it works, same with “” and if I change the webpack proxy to “” or change the dfx.json to start the replica on “localhost” everything works fine … I just did not have to do that in the past.

Anyone have any thoughts on this one? I have Mac M1 …

Hello Forum - FYI, I also posted this in the Dfinity Discord and @kpeacock (Kyle) from the Dfinity team said that this behavior was most likely from a newer version of node.js.

So, I had 17.2 active and he said the SDK supports 12, 14, and 16 …

I unlinked 17, installed 16 and linked it …

for those that use “brew” on a Mac, I did this:

brew install [email protected]
brew unlink node
brew link --overwrite --dry-run [email protected]
#just to check I ran the --dry-run ... my machine wanted an "--overwrite" to complete
brew link --overwrite [email protected]

then started dfx and web pack dev server and it worked as before.

Thanks Kyle …

Updated this case in case others get stuck …


I really hope this bug doesn’t make it into a stable node.js release so that I don’t have the excuse anymore :grimacing:

1 Like