Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test if wasm-pack in present #100

Open
xtuc opened this issue Jan 15, 2021 · 0 comments
Open

test if wasm-pack in present #100

xtuc opened this issue Jan 15, 2021 · 0 comments

Comments

@xtuc
Copy link
Member

xtuc commented Jan 15, 2021

when wasm-pack isn't present it fails with something like:

/home/a/Code/wasm/node_modules/@wasm-tool/wasm-pack-plugin/plugin.js:210
        reject(new Error("Rust compilation."));
               ^

Error: Rust compilation.
    at ChildProcess.<anonymous> (/home/a/Code/wasm/node_modules/@wasm-tool/wasm-pack-plugin/plugin.js:210:16)
    at ChildProcess.emit (node:events:376:20)
    at maybeClose (node:internal/child_process:1063:16)
    at Socket.<anonymous> (node:internal/child_process:449:11)
    at Socket.emit (node:events:376:20)
    at Pipe.<anonymous> (node:net:666:12)
Error: failed to execute `"/usr/bin/node" "/home/a/Code/wrangler2/wranglerjs" "--output-file=/tmp/.wranglerjs_outputhwu8d" "--wasm-binding=WASM_MODULE" "--webpack-config=webpack.config.js"`: exited with exit code: 1

improve the error by checking the binary in PATH first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant