Skip to content

Windows: install.js fails — calls Unix unzip command #56

@chrishuskey

Description

@chrishuskey

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

  1. On a Windows machine (no WSL), run:
    npm install -g @xdevplatform/xurl
    
  2. The postinstall script (install.js) attempts to extract the downloaded binary using unzip, which is a Unix utility not available on Windows.
  3. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions