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

fix: post-install should fail on error #191

Conversation

miraclx
Copy link
Contributor

@miraclx miraclx commented Apr 11, 2024

Fixes #190.

Weird observation, failure cases always take a minimum of 30s. I guess simple-get is not keeping things as simple as it should.

I'll investigate that if I get the time.

@miraclx
Copy link
Contributor Author

miraclx commented Apr 11, 2024

So I looked into it, seems it's caused by the DNS lookup not being cancellable, so even with req.abort called on error, node still waits for the lookup to complete.

Filed an upstream issue - feross/simple-get#84

@Kikobeats
Copy link
Member

@miraclx Thanks for this. Can you drop simple-get and just the builtin fetch in Node.js? 🙂

@miraclx
Copy link
Contributor Author

miraclx commented Apr 11, 2024

Wasn't that stabilized in Node v21?

https://nodejs.org/en/blog/announcements/v21-release-announce#notable-changes

@Kikobeats
Copy link
Member

Kikobeats commented Apr 11, 2024

@miraclx fetch is stable since v18, it's safe to be used
https://nodejs.org/dist/latest-v18.x/docs/api/globals.html#fetch

@miraclx
Copy link
Contributor Author

miraclx commented Apr 12, 2024

Closing in favor of #192

@miraclx miraclx closed this Apr 12, 2024
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

Successfully merging this pull request may close these issues.

post-install failures are minimized
2 participants