[ERROR] Sorry! ionic serve can only be run in an Ionic project directory

I followed this thread to a tee and I still get the [Error]

This is my last sequence.

Preformatted text Hawalitas-MacBook-Pro:SpiinPiin-Private ezraokuro$ npm install -g cordova
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
/usr/local/bin/cordova -> /usr/local/lib/node_modules/cordova/bin/cordova
+ cordova@7.0.1
updated 1 package in 53.587s

Hawalitas-MacBook-Pro:SpiinPiin-Private ezraokuro$ ionic serve
[ERROR] Sorry! ionic serve can only be run in an Ionic project directory.

Hawalitas-MacBook-Pro:SpiinPiin-Private ezraokuro$ npm install --save-dev --save-exact @ionic/cli-p
lugin-ionic1@latest @ionic/cli-plugin-cordova@latest
npm WARN saveError ENOENT: no such file or directory, open '/Users/ezraokuro/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/ezraokuro/package.json'
npm WARN ezraokuro No description
npm WARN ezraokuro No repository field.
npm WARN ezraokuro No README data
npm WARN ezraokuro No license field.

doesn’t sound like a project directory but a user directory.
Where did you create your Ionic project?

It was built on a different machine and pushed to git. I pulled it from a git repository.

But not directly to that folder, right?

Yes that is correct.

You must cd into the project directory. It’s probably named whatever the git repo is.

1 Like

I’m also having this same problem
When I try to create a new project using CLI template example “ionic start myApp blank”, then I try to open the project with “ionic serve” and it shows this errp:

[ERROR] Sorry! ionic servicer only be run in an Ionic project directory

    If this is a project you would like to integrate with Ionic, create an ionic.config.json file.