How to restore project in Ionic 3.X?


#1

Before Ionic 3.X, when we commit Ionic project to Git, the git ignores 3 folders: node_modules, platforms, and plugins. Because we can restore it with

// For node modules
npm install 

// For platforms and plugins
ionic state restore

But in latest version of Ionic CLI 3.X, it seems ionic state restore is deprecated and can’t be used anymore.

If we can’t use ionic state restore, how to restore the product’s necessary part?


#2

Check out ionic-cli #1997.


#3

Thank @rapropos for pointed out. I will show this command for anyone who got into same problem like me.

To restore project’s state, you can use command:

ionic cordova prepare

FYI. In Ionic 3 CLI, it seems anything you are going to try to run project as mobile application will trigger CLI to add plugins and platforms you need.


#4

:sunglasses: :ok_hand:t4:

ionic cordova prepare