Problem
We can't compile the Yew examples by ./build.sh minimal as showed in instructions /examples.
Steps To Reproduce
cargo install wasm-pack ``git clone https://github.com/yewstack/yew.gitcd yew/examples./build.sh minimalIt 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:
master1.44.0Fedora32Looks 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:
Most helpful comment
Looks like the build script needs the cli tool:
cargo install wasm-bindgen-cli