Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing ionic.project file

Tags:

ionic

I just updated nodejs ionic and cordova. Create new ionic project as before:

ionic start myApp blank 

In terminal, go to myApp directory, and input:

ionic state

I got message:

You cannot run any state commands on a project that is not an Ionic project. Try adding an ionic.project file or running ionic start to get an application to save or restore (CLI v1.7.10)

My system information:

  • Cordova CLI: 5.4.0
  • Ionic Version: 1.1.1
  • Ionic CLI Version: 1.7.10
  • Ionic App Lib Version: 0.6.5
  • ios-deploy version: 1.8.3
  • ios-sim version: 5.0.4
  • OS: Mac OS X El Capitan
  • Node Version: v5.1.0
  • Xcode version: Xcode 7.1.1 Build version 7B1005

Question: Where ionic.project file, I don't remember there was this file in project before. How to add ionic.project file?

How do I find this problem? Because I check out source from git, I try to use ionic state restore command to restore application for building. But I got same message, missing ioinc.project. So I create a new ionic project to find reason, but I'm still confused.

If use

ionic start

You will got

Invalid command (CLI v1.7.10)

Of course, there is not directory argument for this command. If you give directory as ./, this command only create and overwrite all project file.

screen shot enter image description here

like image 433
Gino Avatar asked Nov 24 '15 07:11

Gino


People also ask

How do you add Ionic to an existing project?

For adding Ionic to an already existing Angular project, use the Angular CLI's ng add feature. This will add the necessary imports to the @ionic/angular package as well as add the styles needed.


2 Answers

The new name of this file is ionic.config.json

like image 69
Arindam Avatar answered Nov 24 '22 01:11

Arindam


I was facing the same issue. just run the command

ionic serve

ionic.project file gets auto generated

EDIT

ionic.project is replace by ionic.config.json. So you should change in ionic.config.json

like image 24
Jagdish Adusumalli Avatar answered Nov 23 '22 23:11

Jagdish Adusumalli