Open MykalMachon opened 3 years ago
I don't have a Linux machine on hand, but is there any reason the post-install script would fail to download the binary for Linux systems?
The binary downloading logic exists for Linux 32-bit and 64-bit:
and the binaries themselves seem to exist as well on S3: https://shopify-themekit.s3.amazonaws.com/v1.2.0/linux-amd64/theme
@erickzhao , I actually noticed this right after submitting the issue- I just wanted to get this in before I went to bed last night so didn't take much time to source dive beforehand.
I'm at work right now, but will run npm install
on one of my affected repos and look for errors during postinstall / install later tonight and report back.
@erickzhao just confirmed that there are no errors logged when installing the package.
Additionally, now that I know to look, you can tell that nothing is being run on post-install (on windows you watch a progress bar as Themekit is installed)
Is there anything I can do (as someone with access to a Linux machine) to help solve this?
I believe you can use npm link
to symlink a local install of @shopify/node-themekit
to a test repo and try to log what is happening in that post-install script.
I can take a look at this whenever I get around to installing a Linux VM on my Macbook, as well. :)
Problem
On Linux-based operating systems,
@shopify/themekit
fails to install correctly. This is because Themekit itself is not installed during thenpm install
process.I have a workaround (see More Information below), but ideally, we could automate this by detecting the operating system version, and running the Linux Themekit installation command during the
npm install
processTested and confirmed the issue on WSL 2 Ubuntu, Ubuntu 20.04 LTS, and Pop_OS!
Replication steps
@shopify/themekit
as part of a repo or globallyMore Information
I have a temporary workaround which involves the following after running
npm install
in the repo:theme
in your terminalwhereis theme
in your terminal./node_modules/@shopify/themekit
and create a folder called bin, in that folder create a symbolic link to Themekit's installation location (which we noted in step three)ln -s {{ result of step 3 here}}