oasislabs / poker-demo

Sample Poker game using the Oasis Labs Gaming SDK
MIT License
6 stars 2 forks source link

./scripts/build-crates.sh return errors #10

Closed pblin closed 5 years ago

pblin commented 5 years ago

/bin/sh: 1: ./node_modules/.bin/oasis-compile: not found Error: Unknown exit code: 127 at ChildProcess. (/usr/lib/node_modules/truffle-oasis/build/webpack:/packages/truffle-external-compile/index.js:120:1) at ChildProcess.emit (events.js:194:15) at maybeClose (internal/child_process.js:970:16) at Socket.stream.socket.on (internal/child_process.js:389:11) at Socket.emit (events.js:189:13) at Pipe._handle.close (net.js:600:12) Truffle v5.0.4 (core: 5.0.0) Node v10.15.1 Finished release [optimized] target(s) in 2.98s error: failed to extract wasm-bindgen custom sections caused by:

it looks like the Rust project used to create this wasm file was linked against a different version of wasm-bindgen than this binary:

rust wasm file: 0.2.37 this binary: 0.2.40

Currently the bindgen format is unstable enough that these two version must exactly match, so it's required that these two version are kept in sync by either updating the wasm-bindgen dependency or this binary. You should be able to update the wasm-bindgen dependency with:

cargo update -p wasm-bindgen

or you can update the binary with

cargo install -f wasm-bindgen-cli

if this warning fails to go away though and you're not sure what to do feel free to open an issue at https://github.com/rustwasm/wasm-bindgen/issues!

still the same issue after cargo install -f wasm-bindgen-cli

run cargo update -p wasm-bindgen

error: could not find Cargo.toml in /project/poker-demo or any parent directory

andrewosh commented 5 years ago

Hey @pblin, thanks for the issue. Can you instead try installing wasm-bindgen-cli with version 0.2.37 using this command: cargo install wasm-bindgen-cli --vers=0.2.37? The version is pinned inside the poker-demo, so this should ensure that both versions are in sync.

Just noticed that the wasm-bindgen-cli installation line in the README hadn't been updated to specify the exact version -- fixed now. Apologies!

pblin commented 5 years ago

great it works!