#Why does rust asks me to manually add the wasm32-unknown-unknown target?

1 messages · Page 1 of 1 (latest)

thick plaza
#

Error: wasm32-unknown-unknown target not found in sysroot: "/opt/homebrew/Cellar/rust/1.65.0"

Used rustc from the following path: "/opt/homebrew/bin/rustc"
It looks like Rustup is not being used. For non-Rustup setups, the wasm32-unknown-unknown target needs to be installed manually. See https://rustwasm.github.io/wasm-pack/book/prerequisites/non-rustup-setups.html on how to do this.

error Command failed with exit code 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
make: *** [run_web] Error 1

How to undo useing non-Rustup?

wooden thunder
#

I would recommend reinstall rust via rustup.

#

Rust uses a rapid release schedule, it releases a new version every six weeks, if you don't use rustup, you need to redo the steps every six weeks.

#

(Or when you run brew upgrade.)

thick plaza
#

so,

  1. brew uninstall rust
  2. curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    right?
wooden thunder
#

Yes, you can also use brew unlink rust so it preserves your original Rust version should you need to recover it.

thick plaza
#

Thank you so much it works.

austere bronze
#

Why does rust asks me to manually add the wasm32-unknown-unknown target?

thick plaza
#

I am still facing this for a mysterious reason

thick plaza
#

@fickle sedge ideas about this

fickle sedge
thick plaza
#

I did it 😭

fickle sedge
#

whereis rustc

#

Try this

thick plaza
#

rustc: /opt/local/bin/rustc /opt/local/share/man/man1/rustc.1.gz

fickle sedge