Hi team,
I'm getting the following error trying to run the latest RC:
CONSOLE ERROR file:///app/tns_modules/tns-core-modules/trace/trace.js:165:30: ns-renderer: ERROR BOOTSTRAPPING ANGULAR
CONSOLE ERROR file:///app/tns_modules/tns-core-modules/trace/trace.js:165:30: ns-renderer: StaticInjectorError[InjectionToken DocumentToken]:
These are my dependencies:
"dependencies": {
"@angular/animations": "~5.0.0",
"@angular/common": "~5.0.0",
"@angular/compiler": "~5.0.0",
"@angular/core": "~5.0.0",
"@angular/forms": "~5.0.0",
"@angular/http": "~5.0.0",
"@angular/platform-browser": "~5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0",
"@angular/router": "~5.0.0",
"@ngrx/core": "^1.2.0",
"@ngrx/effects": "^4.1.0",
"@ngrx/store": "^4.1.0",
"@ngx-translate/core": "^8.0.0",
"@ngx-translate/http-loader": "^2.0.0",
"nativescript-angular": "^5.0.0-rc.0",
"nativescript-floatingactionbutton": "^4.1.2",
"nativescript-geolocation": "^4.2.0",
"nativescript-google-maps-sdk": "^2.4.2",
"nativescript-gradient": "^2.0.1",
"nativescript-insomnia": "^1.2.1",
"nativescript-performance-monitor": "^1.0.0",
"nativescript-status-bar": "^1.1.1",
"nativescript-theme-core": "~1.0.2",
"reflect-metadata": "~0.1.8",
"rxjs": "^5.5.2",
"tns-core-modules": "~3.3.0",
"zone.js": "~0.8.2"
}
Best regards
Patrick
Hey @patrick-nurt
To update all Angular dependencies so that they would be compatible with nativescript-angular RC do the following.
tns plugin add [email protected]
cd node_modules/nativescript-angular/bin
./update-app-ng-deps
cd ../../../
npm install
tns run ios
Hi @NickIliev,
Tried the above, but still getting same errors, is there any changes that needs to be done in main.ts or the module file?
Br Patrick
@patrick-nurt no breaking changes in these files - try comparing your project with this one using for testing purposes
@NickIliev I created a brand new --ng project and got it working with above commands, must be one of my dependencies that screws it up.
But I am still getting this console.error:
CONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:569:26: Unhandled Promise rejection: profiling_1.log is not a function. (In 'profiling_1.log("ANGULAR BOOTSTRAP DONE. " + profiling_1.uptime())', 'profiling_1.log' is undefined) ; Zone: <root> ; Task: Promise.then ; Value: TypeError: profiling_1.log is not a function. (In 'profiling_1.log("ANGULAR BOOTSTRAP DONE. " + profiling_1.uptime())', 'profiling_1.log' is undefined) file:///app/tns_modules/nativescript-angular/platform-common.js:147:40
CONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:571:22: Error: Uncaught (in promise): TypeError: profiling_1.log is not a function. (In 'profiling_1.log("ANGULAR BOOTSTRAP DONE. " + profiling_1.uptime())', 'profiling_1.log' is undefined)
@patrick-nurt, that can be fixed if you upgrade the tns-core-modules version to next :)
@sis0k0 thanks it worked - on to the next cliff.. Have you guys managed to get the new {ngZone: 'noop'} working?
I can trigger UI updates normally with ApplicationRef.tick() in Angular 5 web apps, but not here unfortunately, would be nice to bypass NgZone :-)
Closing this issue as the main problem was resolved.
@patrick-nurt the Angular 5 support is still under development so stay tuned for updates on that matter.
Most helpful comment
@patrick-nurt, that can be fixed if you upgrade the tns-core-modules version to next :)