after update ionic 2 to latest version, ionic serve failed
hello,
i updated ionic 2 version and i opened new project and i'm trying to run it with
ionic serve and it failed
`C:\Users\adirz\myapps\pelephone>ionic serve
ionic-hello-world@ ionic:serve C:\Users\adirz\myapps\pelephone ionic-app-scripts serve
[01:35:26] ionic-app-scripts 0.0.45
[01:35:26] watch started ...
[01:35:26] build dev started ...
[01:35:26] clean started ...
[01:35:26] clean finished in 1 ms
[01:35:26] copy started ...
[01:35:26] transpile started ...
events.js:160
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE 0.0.0.0:8100
at Object.exports._errnoException (util.js:1036:11)
at exports._exceptionWithHostPort (util.js:1059:20)
at Server._listen2 (net.js:1252:14)
at listen (net.js:1288:10)
at net.js:1398:9
at _combinedTickCallback (internal/process/next_tick.js:77:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:592:11)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "ionic:serve" "--"
npm ERR! node v6.7.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! ionic-hello-world@ ionic:serve: `ionic-app-scripts serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world@ ionic:serve script 'ionic-app-scripts serve'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts serve
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\adirz\myapps\pelephone\npm-debug.log
There was an error serving your Ionic application: There was an error with the spawned command: serve
I'm facing the same error.
Same error :(
after installing ionic@latest. same error
Same here. I updated ionic 2 and created a new project. The new project is using ionic-app-scripts version 0.0.45.
I've also a project with ionic-app-scripts 0.0.38. That is still working. So I looked at the package.json and noticed some differences in "scripts".
For me it solved the issue by doing the following: From my 0.0.38 project I copied the following lines from the package.json:
"scripts": {
"build": "ionic-app-scripts build",
"watch": "ionic-app-scripts watch",
"serve:before": "watch",
"emulate:before": "build",
"deploy:before": "build",
"build:before": "build",
"run:before": "build"
},
And replaced it in my package.json where I use app-scripts 0.0.45. Then I did ionic serve and it all worked for me.
@kwv84 thank you man! it solved my problem! apperciate
I found that error when I am running 2 Ionic serve servers, so try quiting all your serves, and restarting the server you want to work on, OR try running on a different port.
Hello, thanks for using Ionic everyone! You can see our update steps for this change here on the app-scripts changelog.
Hello, i am facing same error with following config Cordova CLI: 6.4.0 Ionic Framework Version: 2.0.0-rc.3 Ionic CLI Version: 2.1.13 Ionic App Lib Version: 2.1.7 Ionic App Scripts Version: 0.0.45 ios-deploy version: Not installed ios-sim version: 5.0.8 OS: OS X El Capitan Node Version: v7.2.0
@ykonstant Check the answer by @jgw96 👍