You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.
As mentioned in this stackoverflow post, you may end up with an incomplete file when simply calling axios(responseType: "stream").then().
Here's a code snippet to replicate this:
consttar=require("tar");constaxios=require("axios");axios({url:"https://workers.cloudflare.com/get-npm-wrangler-binary/1.19.5/x86_64-pc-windows-msvc",responseType: "stream"}).then(res=>{res.data.pipe(tar.x({strip:1,C:"f1"}));}).then(()=>{console.log("done 1");})axios({url:"https://workers.cloudflare.com/get-npm-wrangler-binary/1.19.5/x86_64-pc-windows-msvc",responseType: "stream"}).then(res=>{constwriter=tar.x({strip:1,C:"f2"});//ensure that the user can call `then()` only when the file has//been downloaded entirely.returnnewPromise((resolve,reject)=>{res.data.pipe(writer);leterror=null;writer.on('error',err=>{error=err;writer.close();reject(err);});writer.on('close',()=>{if(!error){resolve(true);}//no need to call the reject here, as it will have been called in the//'error' stream;});});}).then(()=>{console.log("done 2");})
🐛 Bug report
Describe the bug
After an installation with npm,
wrangler
gave me this error:Digging into this, I found the wrangler binary in {user}/.wrangler is smaller than what it should be (7192KB/13646KB). Wrangler worker fine after substituting the binary from https://workers.cloudflare.com/get-npm-wrangler-binary/1.19.5/x86_64-pc-windows-msvc.
However, I did not encounter this issue when configuring wrangler on my mac days before. Maybe it is something with the network connection?
Reproduce the bug
A list of steps to reproduce the bug.
run
npm i @cloudflare/wrangler -g
Expected behavior
wrangler binary should be complete and running.
Environment and versions
Fill out the following information about your environment.
wrangler -V
:1.19.5
node -v
:v14.15.1
wrangler.toml
: not required to reproduceThe text was updated successfully, but these errors were encountered: