-
-
Notifications
You must be signed in to change notification settings - Fork 956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using typescript, jest and http2:true causes RequestError: connect ECONNREFUSED 127.0.0.1:443 #1414
Closed
2 tasks done
Closed
2 tasks done
Comments
|
Is szmarczak/http2-wrapper#50 with latest 11.8.0? I'm using that release and experiencing this. |
Not yet. Anyway HTTP/2 is still buggy on Node.js' side, therefore I do not recommend running it on production. |
Oh I'm sorry - I must have read this wrong, I was seeing this error message, but without using |
Then I'm 100% sure there is an old version of agent-base in your dependencies. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
http2:true option causes error when using got inside tests with jest and typescript.
I saw some other ECONNREFUSED issues where the problem was old version of agent-base, but I have very simple list of dependencies and "npm ls agent-base" found nothing.
The same code works without jest so maybe it's not necessarily got's fault, but I'd like some help pinpointing the problem.
dependencies in the test repo:
Possibly one of these causes the problem, all are the latest versions though.
Actual behavior
await got("https://google.com", {http2: true});
throws error
RequestError: connect ECONNREFUSED 127.0.0.1:443
Expected behavior
Should work. Works if http2 is false. Also works if running the typescript code without jest.
Code to reproduce
I have created a simple repo at https://github.com/ssypi/got-http2-jest
Just clone, npm install and run npm test.
There are two tests inside tests/test.ts, one with http2: true which errors and one without http2 which works.
Checklist
The text was updated successfully, but these errors were encountered: