wasm-pack
wasm-pack copied to clipboard
failed to find an installation of `rustup` in `PATH`, even with rustup is already installed
🐛 Bug description
I set the environment variables, I installed "rustup" on my machine, then when I try to install "wasm-pack" this error appears
🤔 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)
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
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"
.
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