-1

I want to view my ionic project in Ionic View but all it shows is a white screen. Tried running ionic run android -l -c to debug my project but it shows me the following response

ionic-hello-world@0.0.0 ionic:serve C:\Users\GClairGC\Desktop\Angular\wasteman agementsystem ionic-app-scripts serve "--v2" "--runLivereload" "--isPlatformServe" "--consol elogs" "--livereload" "--port" "8101" "--livereload-port" "35730" "--address" "1 92.168.8.228" "--iscordovaserve" "--nobrowser"

[21:47:32] ionic-app-scripts 1.3.0 [21:47:32] watch started ... [21:47:32] build dev started ... events.js:160 throw er; // Unhandled 'error' event ^

Error: listen EADDRINUSE 0.0.0.0:53703 at Object.exports._errnoException (util.js:1018:11) at exports._exceptionWithHostPort (util.js:1041:20) at Server._listen2 (net.js:1262:14) at listen (net.js:1298:10) at net.js:1408:9 at _combinedTickCallback (internal/process/next_tick.js:83:11) at process._tickCallback (internal/process/next_tick.js:104:9) at Module.runMain (module.js:606:11) at run (bootstrap_node.js:393:7) at startup (bootstrap_node.js:150:9)

npm ERR! Windows_NT 6.3.9600 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\ node_modules\npm\bin\npm-cli.js" "run" "ionic:serve" "--" "--v2" "--runLivere load" "--isPlatformServe" "--consolelogs" "--livereload" "--port" "8101" "--live reload-port" "35730" "--address" "192.168.8.228" "--iscordovaserve" "--nobrowser " npm ERR! node v6.10.2 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! ionic-hello-world@0.0.0 ionic:serve: ionic-app-scripts serve "--v2" "- -runLivereload" "--isPlatformServe" "--consolelogs" "--livereload" "--port" "810 1" "--livereload-port" "35730" "--address" "192.168.8.228" "--iscordovaserve" "- -nobrowser" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ionic-hello-world@0.0.0 ionic:serve script 'ionic-app-scr ipts serve "--v2" "--runLivereload" "--isPlatformServe" "--consolelogs" "--liver eload" "--port" "8101" "--livereload-port" "35730" "--address" "192.168.8.228" " --iscordovaserve" "--nobrowser"'. 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 pac kage, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! ionic-app-scripts serve "--v2" "--runLivereload" "--isPlatformServe " "--consolelogs" "--livereload" "--port" "8101" "--livereload-port" "35730" "-- address" "192.168.8.228" "--iscordovaserve" "--nobrowser" 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\GClairGC\Desktop\Angular\wastemanagementsystem\npm-debug.log


package.json

{   "name": "ionic-hello-world",   "version": "0.0.0",   "author": "Ionic Framework",   "homepage": "http://ionicframework.com/",   "private": true,   "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"   }, 
    "dependencies": {
    "@angular/common": "4.0.0",
    "@angular/compiler": "4.0.0",
    "@angular/compiler-cli": "4.0.0",
    "@angular/core": "4.0.0",
    "@angular/forms": "4.0.0",
    "@angular/http": "4.0.0",
    "@angular/platform-browser": "4.0.0",
    "@angular/platform-browser-dynamic": "4.0.0",
    "@angular/router": "4.0.0",
    "@ionic-native/core": "3.4.2",
    "@ionic-native/splash-screen": "3.4.2",
    "@ionic-native/status-bar": "3.4.2",
    "@ionic/storage": "2.0.1",
    "angular2-qrcode": "^2.0.1",
    "firebase": "^3.8.0",
    "ionic-angular": "3.0.1",
    "ionicons": "3.0.0",
    "rxjs": "5.1.1",
    "sw-toolbox": "3.4.0",
    "zone.js": "^0.8.4"   },
    "devDependencies": {
    "@ionic/app-scripts": "1.3.0",
    "typescript": "~2.2.1"   }, 
    "cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-console",
    "cordova-plugin-statusbar",
    "cordova-plugin-device",
    "cordova-plugin-splashscreen",
    "ionic-plugin-keyboard"   ], 
    "cordovaPlatforms": [],   
    "description": "auth: An Ionic project" }

index.html

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
  <meta charset="UTF-8">
  <!--<title>Loading..</title>-->
  <base href="/">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta name="format-detection" content="telephone=no">
  <meta name="msapplication-tap-highlight" content="no">

  <link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
  <link rel="manifest" href="manifest.json">
  <meta name="theme-color" content="#4e8ef7">

  <!-- cordova.js required for cordova apps -->
  <script src="cordova.js"></script>

  <!-- un-comment this code to enable service worker
  <script>
    if ('serviceWorker' in navigator) {
      navigator.serviceWorker.register('service-worker.js')
        .then(() => console.log('service worker installed'))
        .catch(err => console.log('Error', err));
    }
  </script>-->

  <link href="build/main.css" rel="stylesheet">
</head>
<body>

  <!-- Ionic's root component and where the app will load -->
  <ion-app></ion-app>

  <!-- The polyfills js is generated during the build process -->
  <script src="build/polyfills.js"></script>

  <!-- The bundle js is generated during the build process -->
  <script src="build/main.js"></script>

</body>
</html>

2 Answers2

0

Hi first try to run ionic serve after this try running ionic build android than try ionic run -l -c

it will work for you.

Nikhil
  • 417
  • 1
  • 6
  • 16
0

if you have started your poject before some time, let me tell you many things got changed, in your index.html should have these lines, and a few other things get changed around:

 <!-- Polyfill needed for platforms without Promise and Collection support -->
  <script src="build/js/es6-shim.min.js"></script>
  <!-- Zone.js and Reflect-metadata  -->
  <script src="build/js/angular2-polyfills.js"></script>
Nikhil
  • 417
  • 1
  • 6
  • 16