Command app:dev not found

Hello,

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.

Any advice ?

3 Likes

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.

This solved the problem for me, as a work-around.

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.

3 Likes

It is my case, thank you.
So, npm i @Shopify_77 /app@~3.3.3 @Shopify_77 /cli@~3.3.3 solves the problem

1 Like

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