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

cargo wasm-pack install does not work on aarch64 #1125

Closed
alphaqu opened this issue Mar 28, 2022 · 4 comments
Closed

cargo wasm-pack install does not work on aarch64 #1125

alphaqu opened this issue Mar 28, 2022 · 4 comments

Comments

@alphaqu
Copy link

alphaqu commented Mar 28, 2022

🐛 Bug description

I want to install wasm-pack on my server which runs an arm64/aarch64 CPU. The installer does not work so I did cargo install wasm-pack. It compiles but when I run npm install -g wasm-pack or yarn global add wasm-pack it fails.

🤔 Expected Behavior

It registers to the system and does not crash npm.

👟 Steps to reproduce

  • cargo install wasm-pack
  • sudo npm install -g wasm-pack
/usr/bin/wasm-pack -> /usr/lib/node_modules/wasm-pack/run.js

> [email protected] postinstall /usr/lib/node_modules/wasm-pack
> node ./install.js

/usr/lib/node_modules/wasm-pack/binary.js:20
  throw new Error(`Unsupported platform: ${type} ${arch}`);
  ^

Error: Unsupported platform: Linux arm64
    at getPlatform (/usr/lib/node_modules/wasm-pack/binary.js:20:9)
    at getBinary (/usr/lib/node_modules/wasm-pack/binary.js:24:20)
    at install (/usr/lib/node_modules/wasm-pack/binary.js:38:18)
    at Object.<anonymous> (/usr/lib/node_modules/wasm-pack/install.js:4:1)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
    at internal/main/run_main_module.js:17:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node ./install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-03-28T07_32_10_760Z-debug.log

🌍 Your environment

Include the relevant details of your environment.
wasm-pack version: 0.10.2
rustc version: 1.59.0

@frewsxcv
Copy link

#1102

@frewsxcv
Copy link

#1122

@omninonsense
Copy link
Contributor

I'm not sure this issue will be resolved by #1122, since that PR fixes the the download one-liner script. This seems to be triggered by a JS error, so the download logic must be duplicated there.

I could port the same fix to JS as a part of the original MR (it would still be in the spirit of it), because this has come to bite me a second time.

@drager
Copy link
Member

drager commented Mar 19, 2023

Fixed in v0.11.0.

@drager drager closed this as completed Mar 19, 2023
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

4 participants