fix: node-fetch hanging issue when fetching checksum after fetching binary #2804
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Fix
node-fetch
fetch
command hangs indefinitely when fetching the checksum file after fetching the binary, on some macOS devices that have stricter network restrictions. This PR will fix #2798Added some comments to explain the process clearly.
What is the current behavior?
#2798 : running
npm install supabase@latest --save-dev
hangs and failed after waiting for a long time, the error happens at the fetching of the checksum file. However, runningsudo npm install ...
works.Some investigation shows that this error starts happening from version
1.90.0
, version1.89.1
did not have such issue. The change that was made between these two version is in this commit: 571f336By examining the commit, it shows that checksum verification was added as a result, and since then the checksum fetch was run after the fetching of the binary.
What is the new behavior?
By fetching the checksum file (small in size) before fetching the binary file (big in size), both fetch succeeded without error.