Description
npm install -g @xdevplatform/xurl fails on Windows because install.js shells out to the Unix unzip command, which doesn't exist on Windows.
Environment
- OS: Windows 11
- Node: v24.13.1
- npm: v11.8.0
- xurl version: v1.0.3
Steps to Reproduce
- On a Windows machine (no WSL), run:
npm install -g @xdevplatform/xurl
- The postinstall script (
install.js) attempts to extract the downloaded binary using unzip, which is a Unix utility not available on Windows.
- Installation fails.
Expected Behavior
install.js should use a cross-platform extraction method (e.g., Node's built-in zlib, or a library like adm-zip / decompress) so installation works on Windows, macOS, and Linux.
Workaround
Download the pre-built Windows binary directly from the GitHub Releases page and place it on PATH manually. The xurl CLI itself works perfectly on Windows once the binary is in place — only the npm install script is broken.
Suggested Fix
Replace the unzip shell call in install.js with a cross-platform alternative. Options:
- Node built-in
zlib (for .gz)
adm-zip package (for .zip)
tar module (for .tar.gz)
Description
npm install -g @xdevplatform/xurlfails on Windows becauseinstall.jsshells out to the Unixunzipcommand, which doesn't exist on Windows.Environment
Steps to Reproduce
install.js) attempts to extract the downloaded binary usingunzip, which is a Unix utility not available on Windows.Expected Behavior
install.jsshould use a cross-platform extraction method (e.g., Node's built-inzlib, or a library likeadm-zip/decompress) so installation works on Windows, macOS, and Linux.Workaround
Download the pre-built Windows binary directly from the GitHub Releases page and place it on PATH manually. The xurl CLI itself works perfectly on Windows once the binary is in place — only the npm install script is broken.
Suggested Fix
Replace the
unzipshell call ininstall.jswith a cross-platform alternative. Options:zlib(for.gz)adm-zippackage (for.zip)tarmodule (for.tar.gz)