question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[HPM] Error occurred while trying to proxy request

See original GitHub issue

Expected behavior

make proxy request

Actual behavior

make proxy request unstable

Setup

  • http-proxy-middleware: 0.17.1
  • server: webpack -dev-server: 2.3.0

proxy middleware configuration

https://gist.github.com/djleonskennedy/e0521313bc6229d32b006e6d236c4ea3

server mounting

https://webpack.github.io/docs/webpack-dev-server.html#proxy

Hello this issue more about clarification, i have regular proxy to redirect requests to avoid CORS however also we need to be connected to customer VPN, and sometimes we have proxy worked and sometimes we have next

[HPM] Error occurred while trying to proxy request /login from localhost:4200 to <TARGET> (ETIMEDOUT) (https://nodejs.org/api/errors.html#errors_common_system_errors)

but without proxy TARGET endpoint works well always so we’ve decided that it can be problem with proxying some, could you please clarify about it?

Might i need to add some configuration?

Thank you

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:54
  • Comments:45 (4 by maintainers)

github_iconTop GitHub Comments

154reactions
wmzycommented, Jan 9, 2018

I get the error ([HPM] Error occurred while trying to proxy request /api/v1/xxx from localhost:3000 to http://xxx.com (ECONNRESET) (https://nodejs.org/api/errors.html#errors_common_system_errors)) when I post a body. Solved it by remove the express body-parser middleware before HPM. Mybe help for someone.

43reactions
yuankuicommented, Nov 15, 2018

In my case I add a header in the client(proxy), then solves it

may this will help you

module.exports = function(app) {
    app.use(proxy('/api', {
        target: 'http://127.0.0.1:8080/',
        headers: {
            "Connection": "keep-alive"
        },
    }));
};
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error [HPM] Error occurred while trying to proxy request / from ...
That error means there's nothing running at http://localhost:4000 . There seems to be a few problem with your setup:.
Read more >
How to fix error occurred while trying to proxy request
How can I fix Error occurred while trying to proxy request? · 1. Check which IP version is the server using · 2....
Read more >
Fix Error Occurred While Trying to Proxy Request - TechCult
An error occurred while typing to proxy request is a common error that developers come across while writing and publishing codes.
Read more >
[HPM] Error occurred while proxying request [ECONNRESET]
Here is the full error thrown from http-proxy-middleware. “[HPM] Error occurred while proxying request [ECONNRESET]” is published by tanut aran.
Read more >
Angular – Connects to Proxy server and gets response but ...
[HPM] Error occurred while trying to proxy request /api/v1/login from localhost:4200 ... If I check the chrome network console, the status of request...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found