wasm-pack
wasm-pack copied to clipboard
wasm-pack build failed
🐛 Bug description
wasm-pack failed to build.
Output:
** Caused by:
process didn't exit successfully: C:\Users\Admin\AppData\Local\Temp\cargo-install1Jb1dd\release\build\openssl-sys-d4d9acb6a7a07243\build-script-main (exit code: 101)
--- stdout
cargo:rustc-cfg=const_fn
cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR
X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR unset
cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
OPENSSL_NO_VENDOR unset
running "perl" "./Configure" "--prefix=C:\Users\Admin\AppData\Local\Temp\cargo-install1Jb1dd\release\build\openssl-sys-7d1416c908bd1918\out\openssl-build\install" "no-dso" "no-shared" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "no-engine" "no-asm" "VC-WIN64A"
--- stderr
thread 'main' panicked at 'called Result::unwrap() on an Err value: Error { kind: NotFound, message: "program not found" }', C:\Users\Admin.cargo\registry\src\github.com-1ecc6299db9ec823\openssl-src-111.17.0+1.1.1m\src\lib.rs:477:39
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile wasm-pack v0.10.2, intermediate artifacts can be found at C:\Users\Admin\AppData\Local\Temp\cargo-install1Jb1dd
Caused by: build failed **
🤔 Expected Behavior
It should've installed the wasm-pack
👟 Steps to reproduce
/
🌍 Your environment
Windows 10 wasm-pack version: 0.10.2 rustc version: 1.58.1
I've got the same issue on a fresh rust install, windows 11. Same exact error.
Installing wasm-pack from the website's installer worked for me, rather than doing it via cargo.
I fixed it with OPENSSL_DIR="<PATH_TO_DIR>" and OPENSSL_NO_VENDOR=1
The default build requires Perl to be installed. I installed perl through scoop, and then the build worked.
Please try out v0.12.0 from one of the following ways:
- https://github.com/rustwasm/wasm-pack/releases/tag/v0.12.0
- https://crates.io/crates/wasm-pack/0.12.0
- https://www.npmjs.com/package/wasm-pack/v/0.12.0