Yew: ./build.sh: line 43: wasm-bindgen: command not found

Created on 6 Jun 2020  路  2Comments  路  Source: yewstack/yew

Problem

We can't compile the Yew examples by ./build.sh minimal as showed in instructions /examples.

Steps To Reproduce

  1. cargo install wasm-pack ``
  2. git clone https://github.com/yewstack/yew.git
  3. cd yew/examples
  4. ./build.sh minimal

It returns the following error:

$ ./build.sh minimal
[ Building: minimal using wasm-bindgen ]
    Updating crates.io index
   Compiling proc-macro2 v1.0.18
   Compiling unicode-xid v0.2.0
   Compiling syn v1.0.30
   Compiling log v0.4.8
   Compiling wasm-bindgen-shared v0.2.63
   Compiling lazy_static v1.4.0
   Compiling cfg-if v0.1.10
   Compiling bumpalo v3.4.0
   Compiling wasm-bindgen v0.2.63
   Compiling memchr v2.3.3
   Compiling proc-macro-nested v0.1.4
   Compiling proc-macro-hack v0.5.16
   Compiling futures-core v0.3.5
   Compiling serde v1.0.111
   Compiling once_cell v1.4.0
   Compiling futures-sink v0.3.5
   Compiling pin-utils v0.1.0
   Compiling futures-io v0.3.5
   Compiling byteorder v1.3.4
   Compiling ryu v1.0.5
   Compiling slab v0.4.2
   Compiling autocfg v1.0.0
   Compiling anyhow v1.0.31
   Compiling itoa v0.4.5
   Compiling boolinator v2.4.0
   Compiling fnv v1.0.7
   Compiling yew v0.16.2 (/home/silvioprog/yew/yew)
   Compiling bytes v0.5.4
   Compiling cfg-match v0.2.1
   Compiling anymap v0.12.1
   Compiling futures-channel v0.3.5
   Compiling futures-task v0.3.5
   Compiling indexmap v1.4.0
   Compiling http v0.2.1
   Compiling quote v1.0.6
   Compiling wasm-bindgen-backend v0.2.63
   Compiling wasm-bindgen-macro-support v0.2.63
   Compiling pin-project-internal v0.4.19
   Compiling futures-macro v0.3.5
   Compiling serde_derive v1.0.111
   Compiling thiserror-impl v1.0.19
   Compiling yew-macro v0.16.1 (/home/silvioprog/yew/yew-macro)
   Compiling wasm-bindgen-macro v0.2.63
   Compiling thiserror v1.0.19
   Compiling pin-project v0.4.19
   Compiling futures-util v0.3.5
   Compiling js-sys v0.3.40
   Compiling console_error_panic_hook v0.1.6
   Compiling futures-executor v0.3.5
   Compiling web-sys v0.3.40
   Compiling wasm-bindgen-futures v0.4.13
   Compiling futures v0.3.5
   Compiling bincode v1.2.1
   Compiling serde_json v1.0.53
   Compiling gloo-events v0.1.1
   Compiling gloo-console-timer v0.1.0
   Compiling gloo-timers v0.2.1
   Compiling gloo-file v0.1.0
   Compiling gloo v0.2.1
   Compiling minimal v0.1.0 (/home/silvioprog/yew/examples/minimal)
    Finished dev [unoptimized + debuginfo] target(s) in 49.72s
./build.sh: line 43: wasm-bindgen: command not found
[FAIL] Command: "wasm-bindgen --target web --no-typescript --out-dir $SRCDIR/static/ --out-name wasm $TARGET_DIR/$EXAMPLE.wasm" exited with exit code: 127

Environment:

  • Yew version: master
  • Rust version: 1.44.0
  • OS: Fedora32
bug

Most helpful comment

Looks like the build script needs the cli tool:
cargo install wasm-bindgen-cli

All 2 comments

Looks like the build script needs the cli tool:
cargo install wasm-bindgen-cli

It fixed the problem (PR sent https://github.com/yewstack/yew/pull/1290). Thank you very much! :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nixpulvis picture nixpulvis  路  4Comments

ghost picture ghost  路  4Comments

zethra picture zethra  路  5Comments

kellytk picture kellytk  路  4Comments

sackery picture sackery  路  3Comments