Unable to create ionic 3 project instead of 4 - ionic-framework

I tied to create an ionic project v3 using the following command
ionic start myApp tabs
but the final result was an ionic v4 project.
How can I force ionic to crate a v3 project instead of v4 ?

You can use the below command to create a Ionic 3 Project when you have Ionic 4 installed
ionic start ProjectName blank --type=ionic-angular

For reference, you can do this without downgrading your Ionic CLI. Notice that --type=ionic-angular is the Ionic 4 CLI way of saying "Ionic 3". Here's a reference to that:
https://github.com/ionic-team/ionic-cli/issues/3862
If you run ionic start --list it will show the available templates and project types. For project type, angular would be Ionic 4, ionic-angular would be Ionic 3, and ionic1 is actually well named :-)
name | project type | description
--------------------------------------------------------------------------------------------------------------------------------
blank | angular | A blank starter project
sidemenu | angular | A starting project with a side menu with navigation in the content area
tabs | angular | A starting project with a simple tabbed interface
tabs | ionic-angular | A starting project with a simple tabbed interface
blank | ionic-angular | A blank starter project
sidemenu | ionic-angular | A starting project with a side menu with navigation in the content area
super | ionic-angular | A starting project complete with pre-built pages, providers and best practices for Ionic development.
tutorial | ionic-angular | A tutorial based project that goes along with the Ionic documentation
aws | ionic-angular | AWS Mobile Hub Starter
tabs | ionic1 | A starting project for Ionic using a simple tabbed interface
blank | ionic1 | A blank starter project for Ionic
sidemenu | ionic1 | A starting project for Ionic using a side menu with navigation in the content area
maps | ionic1 | An Ionic starter project using Google Maps and a side menu
Also note that you will not start out with cordova assets (e.g. config.xml). Adding a platform for the first time will pull that stuff in though.

You need to uninstall ionic globlally first:
npm uninstall ionic -g
then install a ionic 3 version you like so:
npm install ionic#3.20.0 -g
Now run
ionic info
you should see the ionic (Ionic CLI) : 3.20.0
Now you can install an ionic 3 app using the command you tried.

Related

page creation with ionic version 4

Hello dear community currently I work on my portfolio but with the version 4 of ionic I manage not to generate a new page by typing the command ionic generate page Contact.
Someone could help me
Voila l'erreur aprés avoir lancer la commande :
$ ionic generate page realisations
ng generate page realisations
Could not find module "#ionic/angular-toolkit" from "C:\wamp64\www\fil_Rouge\portfolioV4".
Error: Could not find module "#ionic/angular-toolkit" from "C:\wamp64\www\fil_Rouge\portfolioV4".
at Object.resolve (C:\Users\Stagiaire\AppData\Roaming\npm\node_modules#angular\cli\node_modules#angular-devkit\core\node\resolve.js:141:11)
at NodeModulesEngineHost._resolvePackageJson (C:\Users\Stagiaire\AppData\Roaming\npm\node_modules#angular\cli\node_modules#angular-devkit\schematics\tools\node-module-engine-host.js:28:21)
at NodeModulesEngineHost._resolveCollectionPath (C:\Users\Stagiaire\AppData\Roaming\npm\node_modules#angular\cli\node_modules#angular-devkit\schematics\tools\node-module-engine-host.js:69:40)
at NodeModulesEngineHost.createCollectionDescription (C:\Users\Stagiaire\AppData\Roaming\npm\node_modules#angular\cli\node_modules#angular-devkit\schematics\tools\file-system-engine-host-base.js:111:27)
at SchematicEngine._createCollectionDescription (C:\Users\Stagiaire\AppData\Roaming\npm\node_modules#angular\cli\node_modules#angular-devkit\schematics\src\engine\engine.js:147:40)
at SchematicEngine.createCollection (C:\Users\Stagiaire\AppData\Roaming\npm\node_modules#angular\cli\node_modules#angular-devkit\schematics\src\engine\engine.js:140:43)
So it looks like there are a bunch of missing modules from your ionic installation. I recommend uninstalling ionic globally, re-installing it and then starting a new project. After that, move into the directory of the new project and come back with the output of the ionic info command.
Commands for reference:
npm uninstall -g ionic (Uninstalling Ionic from machine)
npm install -g ionic (Installing it globally)
ionic start blank myApp (starting new app)
cd myApp (change directory to application Mac/Linux/Windows Powershell)
ionic info (Get ionic information )

How to build ionic1- project in ionic3 environment?

My boss gave me an ionic1 project, but my computer is the ionic3 environment. How can I package the project.
'python' : "v-2.7"
'node' : "v-8.9"
'cordova': 'v-7.1'
'ionic' : "v-3.18"
You have to just use this command
ionic start <YOUR APP NAME> --type=ionic1
hope this works for you
you can create new project from template also
ionic start [<project_name>] [<template>] --type=ionic1
example
ionic start myApp tabs --type=ionic1
for more info: https://ionicframework.com/docs/cli/start/
You can use the following code for building Ionic version 1 app in Ionic 3 environment
For sidemenu: ionic start yourappname sidemenu --type ionic1
For tabs: ionic start yourappname tabs --type ionic1

Is it possible to create Ionic 2 project in Ionic 3 CLI

When I do this, I get the message below:
Command :
ionic start blank myapp --v2
Error :
[ERROR] Sorry! The --v1 and --v2 flags have been removed.
Use the --type option. (ionic start --help)
For Ionic Angular projects, try ionic start blank myapp --type=ionic-angular
My Ionic CLI version is :
ionic -v
3.3.0
Update 2 : You can no longer create Ionic 2 project in Ionic 3 CLI.
As Ionic 2 was not updated & is rewritten using Ionic 3, which uses Angular 4.
So if you create new Ionic project it will use Ionic 3 by default.
Update 1 : More Info Available Here
With the updates few changes are done in syntax as well :
To create a new project : (You have 3 templates available with Ionic i.e. blank, tabs, sidemenu)
ionic start {{AppName}} {{TemplateName}} ==> Latest Ionic codebase project
ionic start {{AppName}} {{TemplateName}} --type ionic1 ==> Ionic v1 project
Yes, You can check this link out
ionic start [app-name] [template] --type=ionic1
ionic start [app-name] [template] --type=ionic2
ionic start [app-name] [template] --type=ionic-angular
I have Ionic -v 2.2.2 right now so couldn't test it, so please try and let me know ;)
You don't have to specify --v2 for an Ionic 2 project because an Ionic 3 project is just an Ionic 2 project with some new features such as lazy loading and adoption of Angular 4 instead of Angular 2 .Just like Angular 2 and 4 are the same framework ,Ionic 2 and 3 are the same also
You can check in
ionic start --list
Starters for Ionic 2/3 (--type=ionic-angular)
name | description
-----------------------
tabs | A starting project with a simple tabbed interface
sidemenu | A starting project with a side menu with navigation in the content area
blank | A blank starter project
super | A starting project complete with pre-built pages, providers and best practices for Ionic development.
tutorial | A tutorial based project that goes along with the Ionic documentation
aws | AWS Mobile Hub Starter

what are all the packages,plugins,dependencies need for build a ionic 2 app?

I am new to ionic 2 framework and angular 2 framework.Before going to ionic 2,i were studied the basic introduction about ionic 1.
While considering ionic 1 Framework,if i am going to build a app(works on both android and ios)
we need following things to build an app using ionic framework 1(for Example)
Cordova.js
Package bower provides following files for ionic 1 support.
Ionic.bundle.js
Ionic.bundle.min.js
Ionic.js
Ionic.min.js
Ionic-angular.js
Ionic-angular.min.js
Plugins:-
cordova-plugin-console
cordova-plugin-device
cordova-plugin-splashscreen
cordova-plugin-statusbar
cordova-plugin-whitelist
ionic-plugin-keyboard
On my point of view, from my search results,i were found following for ionic 2 support.
TypeScript
Angular 2
Ionic 2
Could any one tell me,what are the packages,plugins,dependencies need for build an ionic2 mobile app?
First install ionic and cordova
>_ npm install -g ionic cordova
Then download one of the ionic 2 templates.
>_ npm ionic start testapp sidemenu --v2
Then just check the package.json
its all outlined here https://ionicframework.com/docs/v2/setup/installation/

Ionic2 Build folder structure missing

I'm starting to learn Ionic2, I have created a new project with ionic start myproject --v2 and everything works correctly if I do ionic serve.
The build folder is missing in ionic 2 project folder.
Whenever I am trying to download any existing Ionic2 template in that one also build folder missing.
ionic -v 2.0.0-beta.30
cordova -v 6.2.0
node -v v6.2.1
npm -v 3.9.5
your ionic serve build is under www. The native builds ( from ionic build) are under platform.
A little late but I had the same issue and was able to fix it by installing Gulp :
npm install -g gulp
Then I did gulp build.
This solved my issues and generated the build folder as it was supposed to.
First you need to add support for the platform/s you are working with, by executing from Ionic CLI console:
ionic platform add android
or
ionic platform add ios
And then you should build your project by executing:
ionic build android
or
ionic build ios