Ionic serve VS ionic serve -c - ionic-framework

I'm new in Ionic and using Ionic 3.9.2
I got several terminal commands to serve my ionic-app but, I'm not getting any difference between these two commands.
ionic serve
and
ionic serve -c

This is basically short form of ionic serve --consolelogs for printing the log of you app in ionic CLI.(see the image)
There is second command to debug the app which is ionic serve --verbose
Hope this helps you to find out the difference.

ionic serve -c
or
ionic serve --consolelogs
will Print app console logs to your Ionic CLI.
Hope this helps

ionic serve -c will print console logs. If you have a mobile device connected on same wifi, then you can also view your app on the device as well using the ionDevApp .

To run in basic mode use
ionic serve
To run with console log in CLI
ionic serve -c
To run with livereload with console log in CLI
ionic serve -lc
To run with liverelaod in CLI
ionic serve -l
To run in android with livereload with console log in CLI
ionic run android -lc
To run in iOS with livereload with console log in CLI
ionic run ios -lc
Hope it helps

Related

ionic app run perfectly on browser but not working on devApp and android apk

This question is related to ionic 3 and I want to know how to run an ionic app using a real device.
I have developed an hybrid application and I was not able to connect my app with server. It works fine in my laptop browser. But it does not work in devApp and android apk.
I have tried many solutions but was not able to get the perfect solution. I have made a proxy server to access the api by ionic devApp but it doesn't even show a single error.
I think this problem is related about CORS.
Use the additional parameter of --devapp when running your ionic serve.
ionic serve --devapp
Should work now.
For me allowing port 8100 in my firewall was needed. Then everythig works.
CORS is not a problem when you build your app on a real device.
To run your app on android device :
ionic cordova platform add android
ionic cordova build android
ionic cordova run android (Connect your device before executing this)
Try Reinstalling cordova-plugin-whitelist plugin.
I'd the same problem. But I just uninstalled and installed again the ionic DevApp and it solved it.
Try using the command ionic serve -c this for view the app into Ionic devApp
I am not sure if this helps now - In your DevAPp you have settings where you can manually enter IP address and port. This will be the private IP (192.x.x.x) and 8100 that is displayed when you start the ionic serve --devapp from the terminal.

Not able to run ionic app in my device to debug application

Iam trying to run the ionic app in my device for logging errors . I am using the following command
ionic cordova run android -l -c -s --debug
The app is installing in my device but its showing ERR_CONNECTION_REFUSED and the application is closing.
Can some one give solution to this issue ? Thanks
For Livereload the phone and the development machine (dm) have to be on the same network and the mentioned Port has to be reachable (no Firewall on dm, etc.)
Your phone Shows 4g as Network. Ist has to be in your wifi

Ionic App Serve not opening the Chrome Browser

I am trying to create a new Ionic Project it is displaying No browser in the Ionic serve command.
The Image 1 Shows the Info of the Ionic
The Issue where I click Ionic serve it is just displaying "No browser" it is not opening the chrome
Please Run This:
npm run ionic:serve --verbose
From your ionic root folder, it works for me...

Ionic CLI break with Internet connection

I am facing a problem in ionic to start a new ionic project or serve ionic project while Internet connection in on.
In Command Prompt no error come but CLI break after a few seconds. But without an Internet connection it works perfectly, mean without an Internet connection I can serve the ionic project (ionic serve). But to start a new project we have to connect our laptop to the Internet connection and with the connection, I have this problem. I have reinstalled the ionic but still, I'm facing this problem.
This is the image of process of ionic serve with Internet connection
Problem Solved!
first we have to uninstall ionic
npm uninstall -g ionic cordova
still ionic has not completely uninstalled. To do the same we have to delete all ionic files in our windows drive (Local Disk :c).
then we have to uninstall nodejs from control panel.
still node and npm has not uninstalled completely so we also have to delete all node and npm files from c drive.
now install nodejs recommended and the ionic
npm install -g ionic cordova
It will work now....
The server doesn't start up. You should get a lot more processes showing after the
webpack started ...
like sass, postprocess, lint, build etc.
To find out the possible error you can use the verbose switch which may help show what the error is.
$ ionic serve --verbose
Please try that and see what the output is.

Running ionic on browser

I am building a hybrid app using ionic 3 .While I try to run it in browser it gives me a "Missing Command Error".It runs on android and ios though.But i wanted to test it on browser too.
Testing your app in a browser is as simple as running the serve command in your project's root folder.
ionic serve
if you want to run in the ionic lab then run command.
ionic serve -l