Skip to main content

Troubleshooting Theme Kit

Deprecated

Theme Kit is deprecated. Theme developers should use Shopify CLI for Shopify theme development.

This reference guide contains troubleshooting information to help you resolve common issues in Theme Kit.


Before you run any Theme Kit commands, make sure you're using the latest version of Theme Kit. You should also uninstall the shopify-theme gem, if you have used it previously.

Note

If it's your first time installing Theme Kit, then you can ignore the following instructions and refer to the getting started guide.

You can uninstall existing instances of the shopify-theme gem with the following command:

gem uninstall shopify-theme

To update Theme Kit to the latest version, run the following command:

theme update --version=[version number]

For example, if you want to update Theme Kit to version 1.1.1, then you can run the following command:

theme update --version=v1.1.1

To test that Theme Kit is installed and working, run the following command:

theme --help

To reload a page automatically when you make changes to Theme Kit, you can use a reloading tool. There are many options, including the following:

Anchor to Notifying about changesNotifying about changes

To provide Theme Kit with a file to update whenever you make a change, run the following command:

theme watch --notify=/var/tmp/theme_ready

If this file doesn't exist, then Theme Kit will create it when the first change happens. Then, on subsequent events, the file will be updated.

The file is updated only after the request to Shopify has been completed, and not after saving the file. You can then provide the file path to your reloading tool to trigger your browser refresh.


The following section provides some solutions to common errors that you might experience in Theme Kit.

Anchor to Problems uploading changesProblems uploading changes

If you're having trouble uploading changes to Theme Kit, then check if your file is being ignored. Your file might be matching one of the ignore patterns that you previously specified.

Anchor to Error: ‘TLS handshake timeout’Error: ‘TLS handshake timeout’

This error has to do with a file descriptor limit, typically due to using Theme Kit for a long time. You can usually fix this by restarting your terminal. For a long-term solution, refer to the next section.

Anchor to Error: ‘Could not watch directory, too many open files’Error: ‘Could not watch directory, too many open files’

If you receive this error, then it's probably because you're using macOS. macOS has a low limit on file descriptors. You need to raise this limit manually. To raise the limit, run the following commands:

echo kern.maxfiles=65536 | sudo tee -a /etc/sysctl.conf
echo kern.maxfilesperproc=65536 | sudo tee -a /etc/sysctl.conf
sudo sysctl -w kern.maxfiles=65536
sudo sysctl -w kern.maxfilesperproc=65536
ulimit -n 65536 65536

Anchor to Cloud9 replaces files with other contentCloud9 replaces files with other content

If you're using the Cloud9 Editor, then you can make Theme Kit work by placing all of your theme files in a folder in your workspace. After you move the files, run Theme Kit in the new folder.

For more information, refer to this GitHub issue.


You can remove Theme Kit by running the following command:

rm $(name of the theme)

If you installed Theme Kit using Homebrew, then you can run:

brew uninstall themekit


Was this page helpful?