bytecodealliance/cargo-wasi

Failed to find the `wasm32-wasi` target installed

jeff0723 opened this issue · 3 comments

I am using cargo-wasi for Shopify functions. However, whenever I run cargo wasi run, the following error shows error: failed to find the wasm32-wasitarget installed, and rustup is also not detected, you'll need to be sure to install thewasm32-wasi target before using this command.

I've tried rustup target add wasm32-wasi command. And I am using mac m1.

If you run rustup show, what does it print?

Your error message prints:

and rustup is also not detected

so you may have multiple rustc binaries in your $PATH and you probably want to prefer the rustup-installed one if you're using rustup to install the wasm32-wasi target.