-
Notifications
You must be signed in to change notification settings - Fork 27
refactor: replace node-fetch-commonjs with native fetch API #336
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
Conversation
I have become aware that this is supported from Node 18 |
let readBytes = 0 | ||
res.body.on('data', (chunk: Buffer) => { | ||
bodyStream.on('data', (chunk: Buffer) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can we test this code? I guess a clean install would work. Did you try it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you happen to remember the local path I have to clean out to trigger a redownload? Or perhaps I can just run the command again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Windows it's C:\Users\<username>\AppData\Roaming\Code\User\globalStorage\flix.flix\flix.jar
It is possible this PR was broken because of #328 It is also possible its their combination that is broken. |
Reverting boths PRs fixed the problem. I suspect the problem was not in the node fetch, but in the response types PR. Probably an issue with undefined/null etc. But I do not know. |
But it was 100% reproducible and revering both fixed it. |
I cannot reproduce it on this branch, even though it includes both of these PRs. |
Yes, it was very reproducible. But it seems the download completed fine and then the failure happened. Maybe its a nodejs or version issue? I switched to the newest node yesterday. How about you reopen the node-fetch PR and then I try that alone without the type stuff? |
Does the whole extension not use the version of Node built into Electron? |
I have no idea. I guess your point is that nodejs is only used for the build. I guess that it possible. |
You're on macOS, right? Could that make a difference? |
I have both Win and Mac. This was Windows actually. |
Fixes #332