Installing wrangler via npm no longer works.
~\tmp\ > npm i @cloudflare/wrangler -g
C:\Users\Steve Klabnik\AppData\Roaming\npm\wrangler -> C:\Users\Steve Klabnik\AppData\Roaming\npm\node_modules\@cloudflare\wrangler\run-wrangler.js
> @cloudflare/[email protected] postinstall C:\Users\Steve Klabnik\AppData\Roaming\npm\node_modules\@cloudflare\wrangler
> node install-wrangler.js
Downloading release https://github.com/cloudflare/wrangler/releases/download/v1.3.1/wrangler-v1.3.1-x86_64-pc-windows-msvc.tar.gz
Wrangler has been installed!
+ @cloudflare/[email protected]
added 27 packages from 13 contributors in 3.802s
~\tmp\ > wrangler --version
~\tmp\
A version printed.
No version printed.
Doing an initial investigation, the script that runs:
~\AppData\Roaming\npm> cat .\node_modules\@cloudflare\wrangler\run-wrangler.js
#!/usr/bin/env node
const { join } = require("path");
const { homedir } = require("os");
const cwd = join(homedir(), ".wrangler");
const bin = join(cwd, "out", "wrangler");
const [, , ...args] = process.argv;
const opts = {
cwd: process.cwd(),
stdio: "inherit"
};
process.exit(spawnSync(bin, args, opts).status);
Is trying to call into ~\.wrangler\out\wrangler. But its contents:
~\AppData\Roaming\npm> ls 'C:\Users\Steve Klabnik\.wrangler\out\'
Directory: C:\Users\Steve Klabnik\.wrangler\out
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 9/23/2019 2:56 PM 0 LICENSE-MIT
No script, empty license file.
yup, looking into this now, nothing is getting put in the out directory. looking into why.
npm i @cloudflare/[email protected] produces a wrangler binary in the ~/.wrangler/out dir ... but it's empty
this is the root cause: https://github.com/isaacs/minipass/issues/9
working on a fix
Low-priority comment - fab to see the awesome Ashley working on this, thanks. DJ (from Young Rewired State Manchester @ MadLab) waves
omg @qmacro !! long time no chat!
issue is minipass in node-tar https://github.com/npm/node-tar/issues/232
are you trying to . installwrangler? i cangive you the manual . instructions if you'd like (the releases tab has all our binaries for OSX/Windows/Linux :) )
Thanks so much Ashley. Actually I'm experiencing an issue that's related: https://github.com/mapbox/node-sqlite3/issues/1222 (and have a workaround https://github.com/mapbox/node-sqlite3/issues/1222#issuecomment-534297009)
Happy memories https://vimeo.com/75229099 :)
fixed by #690