How can I run Theme Kit on an M1 Mac?

How can I run Theme Kit on an M1 Mac?

BWid55
Shopify Partner
13 0 4

I had theme kit running on my pc but had to get a new computer because it wasn't handling running rpm for scss.

 

I got a new M1 MacBook and it's nice but I can't run theme kit. I have terminal running on Rosetta and successfully downloaded brew. Through brew I downloaded theme kit, but when I run theme in terminal I get this following error:

 

zsh: bad CPU type in executable: theme

 

I really need to get up and running asap. Any help is appreciated. Thank you!

Replies 5 (5)

Zworthkey
Shopify Partner
5581 642 1578

@BWid55 
Have you followed this doc?
I hope this will work easily.
https://shopify.dev/themes/tools/theme-kit/getting-started#macos

 

Thank you.

BWid55
Shopify Partner
13 0 4

@Zworthkey  I believe the only instructs there are to 1. set the terminal to run as rosetta and 2. run the other instructions as normal. Unless I missed something then I did follow these instructions but still am getting this error.

 

EDIT: Some additional information. I tried rerunning the install with:

 

brew tap shopify/shopify
brew install themekit

 

and received this warning:

 

Warning: shopify/shopify/themekit v1.3.0 is already installed and up-to-date.

To reinstall v1.3.0, run:

  brew reinstall themekit

brendan@Brendans-MacBook-Pro ~ % 

 

Which says to me the files are there, but when I type enter "theme" to test if it's functioning I get the first error I posted.

suchintan
Shopify Partner
3 0 1

I was running into the same issue on my M1. Here's my fix on top of running terminal with rosetta2 (x86 compatible which is pretty much running commands with `arch -x86_64` prefix):

reinstall x86-compatible brew binary:

```

arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

```

reinstall ruby (forgot why i picked 3.1 because i somehow saw a post mentioning that some shopify npm package depends on ruby >2.6, <3.2) and all the shopify packages with this x86-compatible brew:

```

arch -x86_64 brew install ruby@3.1

arch -x86_64 /usr/local/bin/brew tap shopify/shopify

arch -x86_64 /usr/local/bin/brew install themekit

```

Gautam_B
Shopify Partner
1 0 0

So, here is the final solution for all of you MAC users -

 

  1. Install HOMEBREW, I suppose you guys already did this Homebrew installation, so let’s move towards the next step.
  2. Run this command in Terminal: brew tap shopify/shopify
  3. Now, do run this command: softwareupdate --install-rosetta
  4. Now, you are able to install the theme kit by running this command: brew install themekit

Arthur_I_A
Tourist
5 0 2

I encountered the same problem with my M2 Max Chip.

Updating Rosetta worked for me →

softwareupdate --install-rosetta