Ionic-cli: Ionic Server not starting after running "ionic serve" on a brand new project

Created on 29 Mar 2017  路  13Comments  路  Source: ionic-team/ionic-cli

_From @LuanGB on March 28, 2017 19:33_

Ionic version: (check one with "x")
[ ] 1.x
[X] 2.x

I'm submitting a ... (check one with "x")
[X] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
After creating a new project via ionic start <app name> --v2, and then cd <app name>, running ionic serve don't start the server, nor open the browser, and any tries to access directly from the browser localhost:8100 are unsuccessful.
After running ionic serve, the only output is:
```

ionic-hello-world@ ionic:serve /home/luan/Projetos/prestacontas
ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"
```

Expected behavior:
after running ionic serve, the browser should open with the home page of the project.

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

My system information:
Cordova CLI: 6.5.0
Ionic Framework Version: 2.3.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.2.2
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.4
Node Version: v6.10.0
Xcode version: Not installed

_Copied from original issue: driftyco/ionic#10955_

Most helpful comment

npm install @ionic/[email protected] within the app dir and things started working.

All 13 comments

Same issue as #2045, it looks like the issue with ionic-app-scripts 1.2.2, the old 1.1.4 works perfectly.

npm install @ionic/[email protected] within the app dir and things started working.

Your system information:

Cordova CLI: Not installed
Ionic Framework Version: 2.2.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.4
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 2.6
Node Version: v6.9.5
Xcode version: Not installed

@Gengjun-VVU Works perfectly!! Thanks a lot!!

Please try gain with @ionic/app-scripts@latest. It should resolve the issue.

Sorry about that.

Thanks,
Dan

Hey @danbucholtz, tried this morning, it actually works perfectly now, could any of you update the templates for all the ionic apps, the package rolled back to 1.1.4, I may be able to do that if you guys are busy. Just let me know. Cheers.

Hi, guys!

Recently, I updated my Ionic to -v 3.4.0 and Cordova to -v 7.0.1.
But I can't start a local dev server for app dev/testing with ionic serve command.

The server is started, the browser opened but not open the home page of the project.

This site can鈥檛 be reached
GET http://localhost:8100/ionic-lab net::ERR_CONNECTION_REFUSED
Any ideas?

Bellow some utils information about my Ionic project

$ ionic info:

global packages:

@ionic/cli-utils : 1.4.0
Ionic CLI        : 3.4.0

local packages:

@ionic/app-scripts              : 1.1.4
@ionic/cli-plugin-ionic-angular : 1.3.1
Ionic Framework                 : ionic-angular 3.4.2

System:

Node       : v7.4.0
OS         : macOS Sierra
Xcode      : Xcode 8.3.2 Build version 8E2002
ios-deploy : not installed
ios-sim    : not installed
npm        : 5.0.3

Any idea, how I can solve that problem?

ionic serve starting the server and ending abruptly ...also installed old version of scripts no use...help anyone
Thanks in advance!!:)

In my case, this was caused because I was running another Ionic app in the background. Stopping the other process fixed this

@dhinakar777 I have the same problem. Did you found out? It would be really helpful :)

Even I am facing the same problem. I tried to rollback to 1.1.4 version, it did not worked and also threw error while compiling, so, I again installed the latest version of @ionic/app-script still it did not work. Please do suggest any solution for this problem. Thanks in advance.

This could happen for webserver redirects. For instance you are making a call using http and server redirects to https.

If your app tries to connect to a web server which uses https while you may be trying using http. Search your code for all access to http://yoursite.com and replace it with https://www.yoursite.com.

[Note: Some browsers (like chrome) may hide the text of protocol (http or https) and even the leading www. So copy the URL from the address bar of browser and paste in a text editor to see what exactly it redirects to.]

Was this page helpful?
0 / 5 - 0 ratings