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:
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
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.
The new name of this file is ionic.config.json
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With