Skip to content

wasm-pack login confusing error message without npm installed#1541

Description

@saghm

馃悰 Bug description

Running wasm-pack login gave a confusing error message that seems to be directly returning a std::io::Error from opening some file without any additional context (e.g. which file it's trying to open, why it needs to try to open a file, etc.):

Error: No such file or directory (os error 2)
Caused by: No such file or directory (os error 2)

馃 Expected Behavior

I was able to figure out that this was because I didn't have npm installed. I'd expect that the error message printed would indicate more clearly what file wasn't found (i.e. an npm executable somewhere on the users PATH) rather than forwarding the underlying I/O error directly.

馃憻 Steps to reproduce

  1. Uninstall npm (or use a machine/container/environment that doesn't have it already)
  2. Run wasm-pack login

馃實 Your environment

wasm-pack version: 0.13.1 (via https://archlinux.org/packages/extra/x86_64/wasm-pack/)
rustc version: probably irrelevant (given that I installed a binary version?)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions