Error where Shopify CLI cannot run the theme development command (“shopify theme dev” returns ‘Command not found’), despite being executed inside a theme directory. On Ubuntu (CLI 3.56.1 → 3.56.2) and Windows (after migrating from CLI 2→3), users see ‘shopify’ missing the ‘theme’ topic, while ‘shopify theme’ shows only a generic usage line with no subcommands. The ‘shopify commands’ list also lacks expected theme commands.
Context: ‘theme dev’ is the CLI command to live-preview local Liquid theme changes. NPM scripts (npm install/run dev) apply to app development, not themes.
Attempts and observations:
Reinstalling CLI and prerequisites (Ruby+DevKit, Bundler, Node.js) did not help.
Multiple OSes affected; suggests environment/path issue rather than OS-specific bug.
Latest guidance: A maintainer points to a known issue where multiple CLI installations coexist and the older one is invoked from PATH. Suggested action is to locate and remove the older CLI install and ensure the newer version is the one resolving for ‘shopify’ (ref: GitHub issue #2884).
Status: No confirmed fix reported by participants. Request for an official Docker image for theme development remains unanswered. Discussion open.
Summarized with AI on December 31.
AI used: gpt-5.
I am using Shopify CLI version 3.56.1 on Ubuntu Linux.
When I run the shopify command, this is what get printed to the terminal:
$ shopify
A CLI tool to build for the Shopify platform
VERSION
@shopify/cli/3.56.1 linux-x64 node-v20.11.1
USAGE
$ shopify [COMMAND]
TOPICS
app Build Shopify apps.
auth Auth operations.
config Disable autocorrect.
COMMANDS
commands list all the commands
help Display help for shopify.
search Starts a search on shopify.dev.
upgrade Upgrade the Shopify CLI.
version Shopify CLI version.
Notice that there is no theme command listed in that output. I have tried uninstalling and reinstalling the Shopify packages (npm install -g @Shopify_77 /cli @Shopify_77 /theme) multiple times and I am still getting this error.
Am I supposed to install some dependencies first? I have seen some people mention running npm commands (e.g. npm install or npm run dev), but there is no package.json file to run npm commands. What am I doing wrong?
If you run shopify theme dev when you’re inside a theme project directory, does this work? The npm commands are all for app development, and the theme commands start with `shopify theme".
So even though the shopify theme command does not appear in the terminal output when I run the shopify command, the shopify theme command appears to still be available. But none of the subcommands under shopify theme are available.
If I run shopify commands, then this is what gets printed to the terminal:
Command Summary
───────────────────────── ─────────────────────────────────────────────
auth logout Logout from Shopify.
commands list all the commands
config autocorrect off Disable autocorrect.
config autocorrect on Enable autocorrect.
config autocorrect status Check autocorrect current status.
help Display help for shopify.
plugins add Installs a plugin into the CLI.
plugins inspect Displays installation properties of a plugin.
plugins install Installs a plugin into the CLI.
plugins link Links a plugin into the CLI for development.
plugins remove Removes a plugin from the CLI.
plugins uninstall Removes a plugin from the CLI.
plugins unlink Removes a plugin from the CLI.
plugins update Update installed plugins.
search Starts a search on shopify.dev.
upgrade Upgrade the Shopify CLI.
version Shopify CLI version.
It seems like this is either a bug with the Shopify CLI version that I am using or that it is a “Well, it works on my computer. Sorry.” kind of a problem. Does Shopify maintain a Docker image that I can use for theme development? Maybe that will fix this issue.
No. I am using Shopify CLI version 3.56.2 on Ubuntu Linux. I have uninstalled Shopify CLI, removed all traces of it from my system, and reinstalled it. I am still getting that same error.
Does Shopify maintain a Docker image that I can use for theme development?
I have the same issue as Samwell2024, I am running this on Windows.
I migrated from CLI 2 to 3.x today by updating all the prerequisites (Ruby+DevKit, Bundler, Node.js), and uninstalling and reinstalling Shopify CLI to the latest version.
Everything related to errors listed, usable commands, commands not founds are the same
It looks like this request for help has gone the way of the dodo. The issue that I have reported is a bit of a deal breaker for me, so I am going to explore some other e-commerce platforms and integrate with my other business platforms through open APIs. I’ll tell you what, Medusa.js looks pretty awesome! It’s open source and modern. If you are a JavaScript developer, then it looks like you are in complete control of the code, data, etc.
Hey Sam - your issue sounds a bit like this one, where an old and new version of the CLI were installed but the older version was loading for shopify commands. Even though you’re running Ubuntu - could you try a similar strategy to fix - by identifying where the older version is being stored and removing it from your machine?