wasm-pack icon indicating copy to clipboard operation
wasm-pack copied to clipboard

failed to find an installation of `rustup` in `PATH`, even with rustup is already installed

Open insinfo opened this issue 3 years ago • 2 comments

🐛 Bug description

I set the environment variables, I installed "rustup" on my machine, then when I try to install "wasm-pack" this error appears

image image

🤔 Expected Behavior

that install normally

🌍 Your environment

Windows 10 64bits rustup --version rustup 1.24.3 (ce5817a94 2021-05-31) info: This is the version for the rustup toolchain manager, not the rustc compiler. info: The currently active rustc version is rustc 1.52.1 (9bc8c42bb 2021-05-09)

RUSTUP_HOME => C:\rust\rustup CARGO_HOME => C:\rust\cargo

cargo --version cargo 1.52.0 (69767412a 2021-04-21)

insinfo avatar Jun 17 '21 15:06 insinfo

I managed to install on my Windows machine with this command

cargo install wasm-pack

When I ran the command "wasm-pack new test" I got an error:

wasm-pack new teste
[INFO]: Installing cargo-generate...
error: the `--vers` provided, `latest`, is not a valid semver version: cannot parse 'latest' as a semver

Error: Installing cargo-generate with cargo
Caused by: failed to execute `cargo install`: exited with exit code: 101
  full command: "cargo" "install" "--force" "cargo-generate" "--version" "latest" "--root" "C:\\Users\\isaque\\AppData\\Local\\.wasm-pack\\.cargo-generate-cargo-install-latest"

then searching can solve this, with this command

cargo install cargo-generate

insinfo avatar Jun 17 '21 19:06 insinfo

If you already add C:\rust\rustup into system PATH and able to run rustup --version via CLI, you can also run the installer from the same CLI with "D:\path\to\wasm-pack-init.exe".

sLEuZP8ZJT

StefansArya avatar May 07 '22 08:05 StefansArya

Using the executable gave me this error even if rustup was in path as which rustup showed the executable. I ran ./wasm-pack-init.exe from the terminal instead of clicking on it and it worked

LivingWithHippos avatar Jan 08 '23 10:01 LivingWithHippos