Ionic Info
Run ionic info from a terminal/cmd prompt and paste the output below.
Ionic:
ionic (Ionic CLI) : 4.1.1 (/Users/san/.nvm/versions/node/v9.4.0/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.13
@angular-devkit/core : 0.7.5
@angular-devkit/schematics : 0.7.5
@angular/cli : 6.2.5
@ionic/ng-toolkit : 1.1.0
@ionic/schematics-angular : 1.0.7
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0, browser 5.0.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 2.1.0, (and 5 other plugins)
System:
Android SDK Tools : 26.1.1 (/Users/san/Library/Android/sdk/)
NodeJS : v9.4.0 (/Users/san/.nvm/versions/node/v9.4.0/bin/node)
npm : 6.4.0
OS : macOS High Sierra
Describe the Bug
A clear and concise description of what the bug is.
When I run ionic serve, the compilation is success. But its throwing error in browser console and nothing is loading.
AppComponent_Host.ngfactory.js? [sm]:1 ERROR TypeError: Class constructor EventEmitter cannot be invoked without 'new'
at new BackButtonEmitter (platform.js:17)
at new Platform (platform.js:32)
at _createClass (core.js:10354)
at _createProviderInstance (core.js:10321)
at resolveNgModuleDep (core.js:10266)
at NgModuleRef_.get (core.js:11373)
at resolveDep (core.js:11865)
at createClass (core.js:11736)
at createDirectiveInstance (core.js:11559)
at createViewNodes (core.js:13100)
My package.json file looks like below.
{
"name": "T.S.S",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^6.1.9",
"@angular/common": "~6.1.1",
"@angular/core": "^6.1.9",
"@angular/forms": "~6.1.1",
"@angular/http": "~6.1.1",
"@angular/platform-browser": "~6.1.1",
"@angular/platform-browser-dynamic": "^6.1.3",
"@angular/router": "~6.1.1",
"@ctrl/ngx-chartjs": "^1.0.3",
"@ionic-native/core": "5.0.0-beta.14",
"@ionic-native/date-picker": "^4.15.0",
"@ionic-native/ionic-webview": "^5.0.0-beta.17",
"@ionic-native/splash-screen": "5.0.0-beta.14",
"@ionic-native/status-bar": "5.0.0-beta.14",
"@ionic/angular": "^4.0.0-beta.0",
"angular-2-dropdown-multiselect": "^1.8.1",
"chart.js": "^2.7.2",
"cordova-android": "7.0.0",
"cordova-browser": "5.0.4",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-ionic-keyboard": "^2.1.2",
"cordova-plugin-ionic-webview": "^2.1.0",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"core-js": "^2.5.3",
"install": "^0.12.1",
"lodash": "^4.17.10",
"ng2-datepicker": "^3.1.1",
"ng4-loading-spinner": "^1.2.3",
"ngx-owl-carousel": "^2.0.7",
"rxjs": "6.2.2",
"typescriptnpm": "^1.0.1",
"web-animations-js": "^2.3.1",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/architect": "~0.7.2",
"@angular-devkit/build-angular": "^0.7.5",
"@angular-devkit/core": "~0.7.2",
"@angular-devkit/schematics": "~0.7.2",
"@angular/cli": "^6.1.5",
"@angular/compiler": "^6.1.3",
"@angular/compiler-cli": "^6.1.6",
"@angular/language-service": "~6.1.1",
"@ionic/ng-toolkit": "^1.0.0",
"@ionic/schematics-angular": "^1.0.0",
"@types/jasmine": "~2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~10.7.1",
"codelyzer": "~4.4.2",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"primeicons": "^1.0.0-beta.10",
"primeng": "^6.1.2",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "^2.9.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-ionic-webview": {}
},
"platforms": [
"android",
"browser"
]
}
}
Got the same problem.
Probably related to: #15979
Same problem
Duplocate of #15979 (and already fixed)
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.
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.
Most helpful comment
Probably related to: #15979