NativeScript/angular

After upgrading to Nativescript 8 from 7 My app crashes with error R3InjectorError(AppModule)[Page -> Page -> Page]

faisalansari20 opened this issue · 1 comments

Issue Description

below is my package json

{
"name": "@nativescript/template-hello-world-ng",
"main": "./src/main.ts",
"version": "7.0.2",
"author": "NativeScript Team oss@nativescript.org",
"description": "NativeScript Application",
"license": "SEE LICENSE IN ",
"publishConfig": {
"access": "public"
},
"keywords": [
"nativescript",
"mobile",
"angular",
"{N}",
"template"
],
"repository": "",
"bugs": {
"url": "https://github.com/NativeScript/NativeScript/issues"
},
"scripts": {
"ngcc": "ngcc --properties es2015 module main --first-only",
"postinstall": "./src/scripts/nativescript-camera/nativescriptCamera.sh",
"android-build": "tns clean && tns prepare android && tns run android",
"ios-build": "tns clean && tns prepare ios && tns run ios",
"ios": "tns run ios --device 'iPhone 12 Pro'"
},
"nativescript": {
"id": "com.atd.atdmobileapp",
"tns-android": {
"version": "6.5.3"
}
},
"dependencies": {
"@angular-devkit/build-angular": "^13.3.1",
"@angular/animations": "~13.3.1",
"@angular/common": "~13.3.1",
"@angular/compiler": "~13.3.1",
"@angular/core": "~13.3.1",
"@angular/forms": "~13.3.1",
"@angular/platform-browser": "~13.3.1",
"@angular/platform-browser-dynamic": "~13.3.1",
"@angular/router": "~13.3.1",
"@dmi/camera": "file:./src/thirdPartyLibraries/camera",
"@nativescript-community/ui-material-bottom-navigation": "^7.0.3",
"@nativescript/angular": "^13.0.0",
"@nativescript/auto-fit-text": "^1.0.1",
"@nativescript/background-http": "^5.0.1",
"@nativescript/core": "~8.2.0",
"@nativescript/email": "^2.0.0",
"@nativescript/firebase": "11.1.3",
"@nativescript/iqkeyboardmanager": "^2.0.0",
"@nativescript/local-notifications": "^5.1.0",
"@nativescript/localize": "^5.0.2",
"@nativescript/theme": "~2.3.0",
"@nota/nativescript-accessibility-ext": "^7.0.3",
"@nstudio/nativescript-cardview": "^2.0.0",
"@nstudio/nativescript-pulltorefresh": "^3.0.1",
"axios": "^0.23.0",
"emitter": "^0.0.5",
"file-base64": "^1.0.0",
"follow-redirects": "^1.13.2",
"jspdf": "^2.1.1",
"nativescript-appversion": "^1.4.4",
"nativescript-barcodescanner": "^4.0.1",
"nativescript-camera": "^4.5.0",
"nativescript-clipboard": "^2.0.0",
"nativescript-fingerprint-auth": "^7.0.2",
"nativescript-gif": "^5.0.0",
"nativescript-numeric-keyboard": "^5.0.0",
"nativescript-orientation": "file:./src/thirdPartyLibraries/nativescript-orientation",
"nativescript-permissions": "1.3.11",
"nativescript-phone": "^2.0.0",
"nativescript-secure-storage": "^2.6.2",
"nativescript-speech-recognition": "^2.0.0",
"nativescript-ui-calendar": "^7.0.2",
"nativescript-ui-listview": "^9.0.2",
"nativescript-videoplayer": "^5.0.1",
"nativescript-xml2js": "^0.5.2",
"pdfmake": "^0.1.68",
"reflect-metadata": "~0.1.12",
"rxjs": "~7.5.0",
"stream": "^0.0.2",
"timer": "^1.0.1",
"util": "^0.10.3",
"zone.js": "~0.11.1"
},
"devDependencies": {
"@angular/cli": "~13.3.1",
"@angular/compiler-cli": "~13.3.1",
"@nativescript/android": "~8.2.0",
"@nativescript/ios": "~8.2.0",
"@nativescript/schematics": "^10.1.0",
"@nativescript/types": "~8.2.0",
"@nativescript/webpack": "~5.0.6",
"@ngtools/webpack": "~13.3.1",
"@schematics/angular": "^10.1.1",
"tns-android": "6.5.3",
"typescript": "~4.5.5"
},
"private": "true",
"readme": "NativeScript Application"
}

Reproduction

No response

Relevant log output (if applicable)

ERROR NullInjectorError: R3InjectorError(AppModule)[Page -> Page -> Page]: 
JS:   NullInjectorError: No provider for Page!
JS: bootstrap: Error bootstrapping app module:
JS: R3InjectorError(AppModule)[Page -> Page -> Page]: 
JS:   NullInjectorError: No provider for Page!
JS: 
JS: NullInjectorError: R3InjectorError(AppModule)[Page -> Page -> Page]: 
JS:   NullInjectorError: No provider for Page!
JS:     at NullInjector.get (file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@angular/core/fesm2015/core.mjs:11120:0)
JS:     at R3Injector.get (file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@angular/core/fesm2015/core.mjs:11287:0)
JS:     at R3Injector.get (file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@angular/core/fesm2015/core.mjs:11287:0)
JS:     at R3Injector.get (file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@angular/core/fesm2015/core.mjs:11287:0)
JS:     at NgModuleRef.get (file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@angular/core/fesm2015/core.mjs:21832:0)
JS:     at Object.get (file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@angular/core/fesm2015/core.mjs:21509:0)
JS:     at lookupTokenUsingModuleInjector (file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@angular/core/fesm2015/core.mjs:3358:0)
JS:     at getOrCreateInjectable (file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@angular/core/fesm2015/core.mjs:3470:0)
JS:     at ...
JS: Unhandled Promise rejection: R3InjectorError(AppModule)[Page -> Page -> Page]: 
JS:   NullInjectorError: No provider for Page! ; Zone: <root> ; Task: Promise.then ; Value: NullInjectorError: R3InjectorError(AppModule)[Page -> Page -> Page]: 
JS:   NullInjectorError: No provider for Page! NullInjectorError: R3InjectorError(AppModule)[Page -> Page -> Page]: 
JS:   NullInjectorError: No provider for Page!
JS:     at NullInjector.get (file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@angular/core/fesm2015/core.mjs:11120:0)
JS:     at R3Injector.get (file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@angular/core/fesm2015/core.mjs:11287:0)
JS:     at R3Injector.get (file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@angular/core/fesm2015/core.mjs:11287:0)
JS:     at R3Injector.get (file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@angular/core/fesm2015/core.mjs:11287:0)
JS:     at NgModuleRef.get (file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@angular/core/fesm2015/core.mjs:21832:0)
JS:     at Object.get (file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@angular/core/fesm2015/core.mjs:21509:0)
JS:     at lookupTokenUsingModuleInjector (file:///data/data/com.atd.atdmobil...

Environment

No response

Please accept these terms

Please check: #45