matrix-org / matrix-rust-sdk-crypto-nodejs

Apache License 2.0
3 stars 5 forks source link

npm/yarn install fails, erroneously calming ia32 in unsupported. #34

Open gegoxaren opened 6 months ago

gegoxaren commented 6 months ago

Greetings, I'm trying to install matrix-appservice-irc via yarn on my old laptop that I use as a server, but I encounter an error when trying to install:

error /usr/local/share/.config/yarn/global/node_modules/@matrix-org/matrix-sdk-crypto-nodejs: Command failed.
Exit code: 1
Command: node download-lib.js
Arguments: 
Directory: /usr/local/share/.config/yarn/global/node_modules/@matrix-org/matrix-sdk-crypto-nodejs
Output:
/usr/local/share/.config/yarn/global/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/download-lib.js:116
                throw new Error(`Unsupported architecture on Linux: ${arch}`);
                ^

Error: Unsupported architecture on Linux: ia32
    at Object.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/download-lib.js:116:23)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Module.load (node:internal/modules/cjs/loader:1197:32)
    at Module._load (node:internal/modules/cjs/loader:1013:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
    at node:internal/main/run_main_module:28:49

Node.js v18.19.0

This is erroneous, as in the official repository for the library states that it does build it or i686.

Can I, somehow, come around this problem?

Thank you in advance, Gustav.

Hywan commented 6 months ago

@gegoxaren I believe it's a matter of updating this file:

https://github.com/matrix-org/matrix-rust-sdk-crypto-nodejs/blob/bf02be0a6c043f3a0ac7a3ea7dba3424dd6ff664/download-lib.js#L100-L124

Are you willing to do it as a contribution?