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

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

Open
gegoxaren opened this issue Feb 19, 2024 · 1 comment
Open

Comments

@gegoxaren
Copy link

gegoxaren commented Feb 19, 2024

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
Copy link
Member

Hywan commented Feb 26, 2024

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

case "linux":
switch (arch) {
case "x64":
if (isMusl()) {
download_lib("matrix-sdk-crypto.linux-x64-musl.node");
} else {
download_lib("matrix-sdk-crypto.linux-x64-gnu.node");
}
break;
case "arm64":
if (isMusl()) {
throw new Error("Linux for arm64 musl isn't support at the moment");
} else {
download_lib("matrix-sdk-crypto.linux-arm64-gnu.node");
}
break;
case "arm":
download_lib("matrix-sdk-crypto.linux-arm-gnueabihf.node");
break;
case "s390x":
download_lib("matrix-sdk-crypto.linux-s390x-gnu.node");
break;
default:
throw new Error(`Unsupported architecture on Linux: ${arch}`);
}

Are you willing to do it as a contribution?

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

2 participants