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

I am using ionic 1 project. After update cordova i get “[ERROR] Sorry! ionic serve can only be run in an Ionic project directory” error message in ionic 1 project. When i try to create new ionic project by “ionic start myApp tabs” It build me new project and its ionic 2. How can i go back to ionic 1 and run my old project ?

Miner Asked on May 19, 2017 in General Stack.
Add Comment


  • LATEST ANSWERS

  • 3 Answer(s)

    With the latest ionic cli, you will need to add the flag --type ionic1 at the end.

    example:
    ionic start myApp tabs --type ionic1

    This will generate a new project with ionic v1. Reference: https://github.com/driftyco/ionic-cli/blob/master/README.md#ionic-1

    Miner Answered on May 27, 2017.
    Add Comment

    No problem:

    1. Go to the newly created project (with Ionic 3.1.1) and open package.json
    2. There should be lines for the @ionic/cli-plugin ...s
    3. Copy these lines to package.json of your Ionic v1 project
    4. Change the ionic-angular to ionic1 (this defines which plugin it installs – here you need a different one than in the new project)
    5. Run npm install in your v1 project folder
    6. Then try ionic serve and ionic info again
    Default Answered on May 27, 2017.
    Add Comment

    Hi, I had the same problem.

    Try renaming the file ionic.project to ionic.config.json this works for me

    Miner Answered on May 27, 2017.
    Add Comment

    Write your answer

    By posting your answer, you agree to the privacy policy and terms of service.