Ionic-framework: ionic v3.x Runtime Error No provider for ApplicationInitStatus!

Created on 29 Apr 2017  路  5Comments  路  Source: ionic-team/ionic-framework

Ionic version:

[x ] 3.x

I'm submitting a ...
[x ] bug report

Current behavior:

Updating the package.json of ionic v2 app and running npm install, ionic serve --lab throws error:

Runtime Error
No provider for ApplicationInitStatus!

Expected behavior:

App should run in --lab

Steps to reproduce:

Steps to Upgrade v2 to v3

Update your package.json to match the following dependencies, remove the existing node_modules directory, and then run npm install:

"dependencies": {
  "@angular/common": "4.0.2",
  "@angular/compiler": "4.0.2",
  "@angular/compiler-cli": "4.0.2",
  "@angular/core": "4.0.2",
  "@angular/forms": "4.0.2",
  "@angular/http": "4.0.2",
  "@angular/platform-browser": "4.0.2",
  "@angular/platform-browser-dynamic": "4.0.2",
  "@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",
  "ionic-angular": "3.1.0",
  "ionicons": "3.0.0",
  "rxjs": "5.1.1",
  "sw-toolbox": "3.4.0",
  "zone.js": "^0.8.5"
},
"devDependencies": {
  "@ionic/app-scripts": "1.3.4",
  "typescript": "~2.2.1"
},

Other information:

Stackoverflow hints in certain posts that there was similar issue when ionic v2 was first released and it was later resolved.

I even tried adding import { BrowserModule } from '@angular/platform-browser';

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

Cordova CLI: 6.5.0 
Ionic Framework Version: 3.1.0
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.4
ios-deploy version: 1.8.6 
ios-sim version: 5.0.8 
OS: macOS Sierra
Node Version: v6.10.1
Xcode version: Xcode 8.2.1 Build version 8C1002

Most helpful comment

Hi

You probably have not added BrowserModule to the imports in app.module.ts

From https://github.com/driftyco/ionic/blob/master/CHANGELOG.md

Import the BrowserModule in your app/app.module.ts file:

import { BrowserModule } from '@angular/platform-browser';

and then add it to the imports in the same file:

imports: [
  BrowserModule,
  IonicModule.forRoot(MyApp)
],

hth
Tim

All 5 comments

Hi

You probably have not added BrowserModule to the imports in app.module.ts

From https://github.com/driftyco/ionic/blob/master/CHANGELOG.md

Import the BrowserModule in your app/app.module.ts file:

import { BrowserModule } from '@angular/platform-browser';

and then add it to the imports in the same file:

imports: [
  BrowserModule,
  IonicModule.forRoot(MyApp)
],

hth
Tim

@timothynott Thanks this worked!

Thank You this is worked

worked for me also thank X10

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings