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

Unable to install if no binary available #99

Open
MichaelMackus opened this issue Sep 7, 2021 · 2 comments · May be fixed by #100
Open

Unable to install if no binary available #99

MichaelMackus opened this issue Sep 7, 2021 · 2 comments · May be fixed by #100

Comments

@MichaelMackus
Copy link

MichaelMackus commented Sep 7, 2021

Problem

Unable to use themekit on arm64 linux (or any other system where there is no binary available)

Replication steps

Run "npm install -g @shopify/themekit" on arm64 linux.

More Information

It seems like themekit doesn't allow any sort of fallback to build if there is no binary available for the architecture. Most other NPM packages use this approach, so that those on different architectures can still use the software (at the cost of compile time). Alternatively, themekit should at least allow the user to use a system installation of themekit if available, which would help alleviate the issue.

I tried building themekit manually (which worked quite well on arm64) and then symlinking the binary to the bin in the node-themekit directory. However, node-themekit seems to force the installation by deleting the binary & then trying to re-install (which fails since there is no arm64 linux binary).

I think having some sort of fallback would be good, even if the arm64 binary does get added eventually. This way we could also install themekit on something like RISC or other alternative architectures.

Having this fallback could also help getting the build working for ARM-based macbooks.

@MichaelMackus
Copy link
Author

Error output:

npm ERR! code 1
npm ERR! path /usr/lib/node_modules/@shopify/themekit
npm ERR! command failed
npm ERR! command sh -c node ./lib/cli.js install
npm ERR! -
npm ERR! /usr/lib/node_modules/@shopify/themekit/lib/install.js:37
npm ERR!     throw new Error(err);
npm ERR!           ^
npm ERR!
npm ERR! Error: Error: Command failed: /usr/lib/node_modules/@shopify/themekit/bin/theme version
npm ERR! /usr/lib/node_modules/@shopify/themekit/bin/theme: /usr/lib/node_modules/@shopify/themekit/bin/theme: cannot execute binary file
npm ERR!
npm ERR!
npm ERR!     at install (/usr/lib/node_modules/@shopify/themekit/lib/install.js:37:11)
npm ERR!     at runMicrotasks (<anonymous>)
npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:96:5)

@MichaelMackus MichaelMackus linked a pull request Sep 15, 2021 that will close this issue
@Sambuxc
Copy link

Sambuxc commented Apr 11, 2023

Has anyone got any further info on this? I'm getting a similar error.
This is when I run npm install
Node v10.14.0
Slate v0.14.0
Npm v 6.4.1
Mac OS Venture 13.2.1 - Intel Core i7

> node ./lib/cli.js install

\/packages/slate-tools/node_modules/@shopify/themekit/lib/install.js:46
        throw runErr;
        ^

Error: The `/packages/slate-tools/node_modules/@shopify/themekit/bin/theme` binary doesn't seem to work correctly
    at BinWrapper.<anonymous> (/packages/slate-tools/node_modules/bin-wrapper/index.js:156:7)
    at ChildProcess.<anonymous> (/packages/slate-tools/node_modules/bin-check/index.js:26:4)
    at ChildProcess.emit (events.js:182:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @shopify/themekit@0.6.6 postinstall: `node ./lib/cli.js install`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @shopify/themekit@0.6.6 postinstall script.

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

Successfully merging a pull request may close this issue.

2 participants