Main issue: After moving a Shopify app project to a new macOS device, running “npm run dev” fails with “command app:dev not found,” indicating Shopify CLI commands aren’t recognized.
Observed behavior: On macOS, only a limited set of Shopify app commands appears (connect, create, deploy, open, serve, tunnel). Running “shopify app serve” errors with “you’re not in a Shopify project,” though the same project worked on Windows.
Workarounds/Fixes:
Create a new Shopify app project with current tooling, then replace its code with the old project’s code; this allowed development to continue.
Upgrade Shopify CLI/tooling to ~3.3.3, delete node_modules, and reinstall dependencies; after bumping versions, “yarn dev” (or “yarn run shopify app”) works.
Install updated packages for the CLI and app modules at ~3.3.3 to resolve the missing command.
Additional context: For users on Yarn Berry (Yarn v3/v4), an upstream oclif/core issue may cause command resolution problems; a GitHub issue is referenced.
Status: Effectively resolved by upgrading Shopify CLI to ~3.3.3; Yarn Berry users should check the linked oclif issue for ongoing compatibility updates.
I started developing a Shopify application during the last weeks. It worked fine.
Today, I changed my device. On the new device, I downloaded from GitHub the same project I had been working on earlier. However when I run “npm run dev”, as I had been used to previously, I get an error : “command app:dev not found”.
I am unable to understand the problem. I understand that the Shopify CLI tool does not work, because one of its commands is not recognized anymore, but I can’t understand why this happens.
same problem here, I’ve tried to run on MacOS after installing shopify-cli but it says that shopify app has only some commands available like: connect, create, deploy, open, serve and tunnel
tried to run: shopify app serve, resulting into an error: you’re not in a shopify project…but it worked on Windows, means you can’t initialize a project on Windows and then continue developing it on MacOS ?
Not sure exactly of what it means but I managed to make it work, still on mac. I created a new Shopify project and replaced its code with the code of my previous project that I was unable to launch. Then after doing this code replacement I was able to launch the second project and keep working on it.
I fixed this by simply bumping up the CLI version.
Let me guess, you were using 3.0.24 like me? I deleted my node_modules, bumped the version to 3.3.3, re-installed the packages and now yarn dev (yarn run shopify app) works.
I guess that’s why creating a new app worked - it’s now served with the 3.3.3 CLI.
If someone else gets here when trying to develop a shopify app with yarn berry / yarn 3 or yarn 4, this might be the issue you’re encountering: https://github.com/oclif/core/issues/806