ERROR NullInjectorError: R3InjectorError(AppModule)[Page -> Page -> Page]:

Viewed 272

I recently attempted a migration from my old NS6 app to NS8. I followed steps on this page with no luck: https://blog.nativescript.org/nativescript-8-announcement/

So, I created a new NS8 app with the CLI, manually migrated my working NS6 code to the new app. Yesterday I was at 183 errors, now down to this last one and can't figure it out for the life of me. any ideas? many thanks in advance!

JS: 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\mayapp\node_modules\@angular\core\__ivy_ngcc__\fesm2015\core.js:11081:0)
JS:     at R3Injector.get (file: src\webpack:\@nativescript\mayapp\node_modules\@angular\core\__ivy_ngcc__\fesm2015\core.js:11247:0)
JS:     at R3Injector.get (file: src\webpack:\@nativescript\mayapp\node_modules\@angular\core\__ivy_ngcc__\fesm2015\core.js:11247:0)
JS:     at R3Injector.get (file: src\webpack:\@nativescript\mayapp\node_modules\@angular\core\__ivy_ngcc__\fesm2015\core.js:11247:0)
JS:     at NgModuleRef$1.get (file: src\webpack:\@nativescript\mayapp\node_modules\@angular\core\__ivy_ngcc__\fesm2015\core.js:25341:0)
JS:     at Object.get (file: src\webpack:\@nativescript\mayapp\node_modules\@angular\core\__ivy_ngcc__\fesm2015\core.js:25055:0)
JS:     at lookupTokenUsingModuleInjector (file: src\webpack:\@nativescript\mayapp\node_modules\@angular\core\__ivy_ngcc__\fesm2015\core.js:3342:0)
1 Answers

In my case I had to use <page-router-outlet></page-router-outlet> instead of <router-outlet></router-outlet> in app.component.html

Related