wasm-pack icon indicating copy to clipboard operation
wasm-pack copied to clipboard

Extra options `--target-dir` build error

Open utherpally opened this issue 4 years ago • 0 comments

🐛 Bug description

Run wasm-pack with --target-dir extra-options

wasm-pack build frontend --target web --no-typescript --dev -- --target-dir target/frontend

Raise an error:

error: failed to read `/home/dev/Projects/maple/target/wasm32-unknown-unknown/debug/frontend.wasm`

Caused by:
    0: failed to read `/home/dev/Projects/maple/target/wasm32-unknown-unknown/debug/frontend.wasm`
    1: No such file or directory (os error 2)
Error: Running the wasm-bindgen CLI
Caused by: failed to execute `wasm-bindgen`: exited with exit status: 1
  full command: "/home/dev/.cargo/bin/wasm-bindgen" "/home/dev/Projects/maple/target/wasm32-unknown-unknown/debug/frontend.wasm" "--out-dir" "frontend/pkg" "--no-typescript" "--target" "web" "--debug"

🌍 Your environment

Include the relevant details of your environment. wasm-pack version: 0.10.1 rustc version: 1.58.0-nightly (514b38779 2021-10-22)

utherpally avatar Oct 31 '21 14:10 utherpally