Ionic - Ionic Serve not working, blank page

General Tech Bugs & Fixes 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I'm currently developing an application under the Ionic framework. After trying to inject a function in a state in a .js file corresponding to a page of my application, I encountered a very strange problem.

My Ionic Serve refreshed and became blank and I had this message written when I tried a new Ionic Serve command :

[WARN] Error with .\www\lib\ionic\version.json file: FILE_NOT_FOUND, trying .\bower.json.

I already checked the Internet, I deleted my node_modules folder and did npm install after. The warning has disappeared but Ionic Serve still gives me a blank page instead of my index.html.

Here is my 'ionic info' output :

$ ionic info
[WARN] Error with .\www\lib\ionic\version.json file: FILE_NOT_FOUND, trying 
.\bower.json.
[WARN] Error with .\www\lib\ionic\version.json file: FILE_NOT_FOUND, trying 
.\bower.json.

cli packages: (C:\Users\RAPH\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0
Gulp CLI              : CLI version 3.9.1 Local version 3.9.1

local packages:

Cordova Platforms : android 7.0.0
Ionic Framework   : ionic1 1.3.4

System:

Android SDK Tools : 26.1.1
Node              : v10.2.1
npm               : 5.6.0
OS                : Windows 7

Environment Variables:

ANDROID_HOME : C:\Users\RAPH\AppData\Local\Android\Sdk

Misc:

backend : pro

Please help me to resolve this problem, I need to finish my work for sunday. I would be very grateful and if I can help you on something else don't hesitate to ask in return

profilepic.png
manpreet 2 years ago

 

Is this how you're entire code block looks?

var app = angular.module('app', ['ui.router']);
app.config(function($stateProvider, $urlRouterProvider) {
  $urlRouterProvider.otherwise("/index");
  $stateProvider
    .state("index", {
      url: "/index",
      templateUrl: "index.html"
    })
    .state("menu", {
      url: "/menu",
      templateUrl: "menu.html"
    })
    .state("indication_patient", {
      url: "/indication_patient",
      templateUrl: "indication_patient.html"
    })
    .state("competition", {
      url: "/competition",
      templateUrl: "competition.html"
    })
    .state("patient", {
      url: "/patient",
      templateUrl: "patient.html"
    })
    .state("athlete", {
      url: "/athlete",
      templateUrl: "athlete.html"
    });
});

0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.