Ionic Runtime Error in Tutorial - ionic-framework

I am following the Ionic Tutorial from their docs and when I run:
ionic start MyIonic2Project tutorial --v2
I get no errors. But when I try to run it using
ionic serve
I get the following error:
I have done nothing with the code. Is there something wrong with installation of ionic?

Firstly you have to move into MyIonic2Project folder.Then run as shown below.
c:\MyIonic2Project> ionic serve

Related

Adding Cordova to ionic 4 failing

I have been trying to add Cordova to ionic 4 projects but i keep getting an error and I know prior now i was able to add the same but not anymore.
Whenever i run the below command its exiting with error code 1
ionic cordova plugin add cordova-plugin-x-socialsharing
I don't actually know what i am doing wrong or Cordova is no longer working
I have asked in the ionic forum but no response yet
https://forum.ionicframework.com/t/not-able-to-add-cordova-to-ionic-4/177323

Could not find cordova integration in the default project

following the official getting started tutorial I get the following error when I try to deploy the application in my phone using this command: ionic serve --devapp (it works on browser):
[ERROR] Could not find cordova integration in the default project.
I get this error both on Windows and MacOS.
I'm using Node 6.4.1 and Ionic CLI 4.10.3
Does the official tutorial missing something?
I had the same issue. In fact, with the default project, you have to copy the cordova assets to prepare the native build for mobile.
You can find more info here : Ionic documentation
Try this :
ionic cordova prepare
And then go again with :
ionic serve --devapp
The accepted answer is 100% correct .
But the reason why this occurred for me was that somehow the default was capacitor and not cordova.
so first i ran
ionic integrations disable capacitor
then ran
ionic cordova prepare
which solved my issue

Ionic config directory error. (How to solve)

I have a issue using ionic on my mac. I've cloned my repo and started it with ionic serve. But if I use control C and stop the command ant start it again I get this error "Cannot read property 'IONIC_CONFIG_DIRECTORY' of undefined".
Same problem here. Found the solution: https://forum.ionicframework.com/t/ionic-commands-not-working-after-update-ionic/146492/3
Solution:
npm uninstall ionic cordova
npm install ionic cordova

How to start IONIC application

I'm installing Ionic with the aim of learning this Framework, but I'm not getting results when I give the command ionic serve .... I get the following error: [ERROR] Sorry! ionic serve can only be run in an Ionic project directory.
error
While I create my project files, I do not know if these are well named .... I attach a photo of these
explorer
I have installed Node, Apache Cordova and Ionic ... I do not know what's happening ... any help for me?
Do that inside primerapp folder

ionic: Starter app with -v1

I am getting started with Ionic. I want to use ionic 1. I am using following command to create ionic v1 app as explained here.
ionic start -v1 myapp blank
But it's creating ionic v2 app using angular 2. I don't know why it is doing so. I also tried commands below but no luck.
ionic -v1 start myapp blank
ionic start myapp -v1 blank
ionic start myapp blank -v1
It's not showing any error or warning either. Can anyone please help? Thanks.
You need to downgrade your ionic version. Then run "ionic start myproject blank" without --v
The current way of doing this is using the --type=ionic1 option:
ionic --version # 3.8.1
ionic start test blank --type=ionic1