Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

After updating rustup, cannot build a project anymore #1340

Open
Horusiath opened this issue Oct 17, 2023 · 2 comments
Open

After updating rustup, cannot build a project anymore #1340

Horusiath opened this issue Oct 17, 2023 · 2 comments

Comments

@Horusiath
Copy link

Horusiath commented Oct 17, 2023

馃悰 Bug description

After running rustup update, calling wasm-pack build --target nodejs over the project it worked so far, no longer works. The error is as follows:

[INFO]: 馃幆 Checking for the Wasm target...
Error: wasm32-unknown-unknown target not found in sysroot: "/usr/local/Cellar/rust/1.72.0_2"

Used rustc from the following path: "/usr/local/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.

Caused by: wasm32-unknown-unknown target not found in sysroot: "/usr/local/Cellar/rust/1.72.0_2"

Used rustc from the following path: "/usr/local/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.

馃實 Your environment

OS: MacOS
wasm-pack version: 0.12.1
rustup show:

rustup show
Default host: x86_64-apple-darwin
rustup home:  /Users/bartoszsypytkowski/.rustup

installed toolchains
--------------------

stable-x86_64-apple-darwin
nightly-x86_64-apple-darwin (default)
1.67.0-x86_64-apple-darwin
1.69.0-x86_64-apple-darwin
1.70.0-x86_64-apple-darwin
1.71.0-x86_64-apple-darwin

installed targets for active toolchain (stable)
--------------------------------------

wasm32-unknown-unknown
wasm32-wasi
x86_64-apple-darwin

active toolchain
----------------

stable-x86_64-apple-darwin (default)
rustc 1.73.0 (cc66ad468 2023-10-03)

installed targets for active toolchain (nightly)
--------------------------------------

wasm32-unknown-unknown
x86_64-apple-darwin
x86_64-unknown-linux-gnu

active toolchain
----------------

nightly-x86_64-apple-darwin (default)
rustc 1.75.0-nightly (49691b1f7 2023-10-16)

Issue remains regardless of me using nightly or stable toolchain version. Other Rust projects (not using wasm-pack) can be compiled via cargo without issues.

@cdmistman
Copy link

Error: wasm32-unknown-unknown target not found in sysroot: "/usr/local/Cellar/rust/1.72.0_2"

Used rustc from the following path: "/usr/local/bin/rustc"

can you try uninstalling rust from homebrew? brew uninstall rust

@Horusiath
Copy link
Author

Eventually I uninstalled everything (using brew uninstall rust and rustup self uninstall) and reinstalled rustup again to solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants