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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hanged on Installing wasm-bindgen #44

Closed
t1anchen opened this issue Aug 15, 2019 · 3 comments
Closed

Hanged on Installing wasm-bindgen #44

t1anchen opened this issue Aug 15, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@t1anchen
Copy link

Describe the Bug

The installation hangs around Installing wasm-bindgen.

$ wasm-pack build
[INFO]: 🎯  Checking for the Wasm target...
[INFO]: 🌀  Compiling to Wasm...
    Updating crates.io index
   Compiling proc-macro2 v1.0.0
   Compiling unicode-xid v0.2.0
   Compiling wasm-bindgen-shared v0.2.49
   Compiling log v0.4.8
   Compiling syn v1.0.1
   Compiling cfg-if v0.1.9
   Compiling bumpalo v2.5.0
   Compiling lazy_static v1.3.0
   Compiling wasm-bindgen v0.2.49
   Compiling quote v1.0.0
   Compiling wasm-bindgen-backend v0.2.49
   Compiling wasm-bindgen-macro-support v0.2.49
   Compiling wasm-bindgen-macro v0.2.49
   Compiling console_error_panic_hook v0.1.6
   Compiling wasm-game-of-life v0.1.0 (/Users/xxx/projects/wasm-game-of-life)
warning: function is never used: `set_panic_hook`
 --> src/utils.rs:1:1
  |
1 | pub fn set_panic_hook() {
  | ^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(dead_code)] on by default

    Finished release [optimized] target(s) in 54.57s
[INFO]: ⬇️  Installing wasm-bindgen...

Steps to Reproduce

Follow the Setup directives of Rust and WebAssembly book to install the dependencies.

  1. cargo install wasm-pack and the version of wasm-pack is 0.8.1
  2. cargo install cargo-generate and cargo-generate version is 0.4.0
  3. npm version is 6.10.3
  4. cargo generate --git https://github.com/rustwasm/wasm-pack-template
  5. Type name as wasm-game-of-life
  6. cd wasm-game-of-life
  7. wasm-pack build
  8. It hanged around Installing wasm-bindgen

I check the version of wasm-bindgen, which is 0.2.49.

Expected Behavior

It should be accomplished in a short time insteald of hanging there.

Actual Behavior

The installation hangs around Installing wasm-bindgen.

Additional Context

Additional question: Is this project alive and under maintainance?

@t1anchen t1anchen added the bug Something isn't working label Aug 15, 2019
@t1anchen
Copy link
Author

t1anchen commented Aug 15, 2019

I found an ad-hoc solution.

Recommendations

  • Change version of wasm-bindgen in the dependencies section of Cargo.toml to a concrete version, i.e. wasm-bindgen = "0.2.49"
  • Try cargo install wasm-bindgen-cli, and the version would be EXACTLY SAME as the verision installed by wasm-pack build. i.e. if the latest wasm-bindgen 0.2 version is 0.2.49, install the cli by cargo install wasm-bindgen-cli --version 0.2.49 then rerun wasm build.

Hopefully this solution can be helpful for those who have same issues.

Reference/Links

@yangdonglai
Copy link

Mark

jstarry pushed a commit to yewstack/yew that referenced this issue Aug 15, 2020
I just tried the sample app.
I had to specify the exact wasm-bindgen otherwise, wasm-pack is hanging

same as: rustwasm/wasm-pack-template#44
jstarry pushed a commit to yewstack/yew that referenced this issue Aug 16, 2020
I just tried the sample app.
I had to specify the exact wasm-bindgen otherwise, wasm-pack is hanging

same as: rustwasm/wasm-pack-template#44
teymour-aldridge pushed a commit to teymour-aldridge/yew that referenced this issue Sep 1, 2020
I just tried the sample app.
I had to specify the exact wasm-bindgen otherwise, wasm-pack is hanging

same as: rustwasm/wasm-pack-template#44
@juxuny
Copy link

juxuny commented Dec 17, 2024

Finally, I install wasm-bindgen-cli and wasm-opt before running wasm-pack build, I got it fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants