Skip to content
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

http.globalAgent/ https.globalAgent is writable as of Node.js v12 #7670

Open
gajus opened this issue Apr 25, 2019 · 1 comment
Open

http.globalAgent/ https.globalAgent is writable as of Node.js v12 #7670

gajus opened this issue Apr 25, 2019 · 1 comment
Labels
Accepting PRs Library definitions Issues or pull requests about core library definitions node

Comments

@gajus
Copy link

gajus commented Apr 25, 2019

Flow version: 0.97.0

Code

import http from 'http';

http.globalAgent = new http.Agent();

Expected behavior

No error.

Actual behavior

Error:

Cannot assign defaultHttpsAgent to https.globalAgent because property globalAgent is not writable

Context

As of Node.js v12, these properties are writable.

nodejs/node@5774688

These properties are currently used in global-agent.

@jamesisaac jamesisaac added Library definitions Issues or pull requests about core library definitions and removed needs triage bug labels Apr 25, 2019
@gajus
Copy link
Author

gajus commented May 6, 2019

Correction.

It is writable as of v11.7.

https://nodejs.org/uk/blog/release/v11.7.0/

@goodmind goodmind added the node label Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepting PRs Library definitions Issues or pull requests about core library definitions node
Projects
None yet
Development

No branches or pull requests

4 participants