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

"Error: fetch failed" on node 18 behind corporate proxy #113

Closed
pfei5 opened this issue Sep 7, 2023 · 6 comments
Closed

"Error: fetch failed" on node 18 behind corporate proxy #113

pfei5 opened this issue Sep 7, 2023 · 6 comments
Assignees

Comments

@pfei5
Copy link

pfei5 commented Sep 7, 2023

I upgraded my pipeline to use node 18.17.1. With that upgrade I get an error "Error: fetch failed". (see screenshot below).
Downgrading to node 16 resolves that error.

My pipeline runs behind a corporate proxy server.

My wild guess for what might be happening is this:
Node 18 introduced a global fetch api.
I'm guessing that the http client falls back to using that native fetch api when it's available, without honoring the proxy settings.

nrwl:nx-set-shas
@meeroslav meeroslav self-assigned this Sep 7, 2023
@meeroslav
Copy link
Collaborator

Lucky coincidence, this should be fixing that: #106

Can you double-check, please? The version 3.3 updated repo to Node v18 and bumps the version of octokit dependencies (which require v18) so hopefully that should solve it.

@pfei5
Copy link
Author

pfei5 commented Sep 7, 2023

@meeroslav works like a charm! Thank you very much!

@dekkofilms
Copy link

@meeroslav should that version bump requirement have been a major version bump rather than a minor version? It has recently caused some failures in our CI process.

@meeroslav
Copy link
Collaborator

This in particular was tested on Node 14 and works the same way as it does on v18. Initially we wanted to make it a major version (v4) but after testing we bumped it down to just minor.

@dekkofilms
Copy link

@meeroslav interesting ... we are on node 14 and it does not work. we had to pin everything to 3.2.2 and the problem was resolved.

@meeroslav
Copy link
Collaborator

@dekkofilms can you create a new issue and report what error you get?

I tested with two of our repos and didn't encounter any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants