Issue
How can I create a project with ionic 5 using "ionic start". I have Ionic cli version 6.20.8 and Node 16.14.0 and the projects are created with ionic 7.
What I did was to install another version of the cli with "npm install -g [email protected]"
but it installs version 6.20.8, the same I tried with the command "ionic start myApp tabs --type=angular --capacitor --version=5.4.16"
but it is still created with version 7 of Ionic.
Solution
You do not need to use version 5 of Ionic to achieve your goal. In fact, I would recommend against a version 2 releases behind.
A workaround would be as such:
Create a base angular project
npx -p @angular/cli ng new myApp
Go into the newly created project
cd myApp
Init the project as an Ionic app
npx @ionic/cli init "My App" --type=angular
This will create a project with the latest and greatest and include the module structure you want. However, it doesn't create the tabs. You will have to add this by hand.
If you really want to do Ionic 5 and have tabs auto added you can use the old package name and do npx ionic start myApp tabs --type=angular --capacitor
But speaking from experience, if you are doing any kind of professional work, I strongly recommend that you make the commitment to staying on the latest versions and libraries for the sake of security/bug fixes, build processes, and long-term maintainability.
Answered By - user796446
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.