StaticInjectorError(Platform: core)[RouterScroller -> ViewportScroller]
See original GitHub issueHi,
I am getting below error after updating the angular(ionic) application.
core.js:7376 ERROR NullInjectorError: StaticInjectorError(AppModule)[RouterScroller -> ViewportScroller]: StaticInjectorError(Platform: core)[RouterScroller -> ViewportScroller]: NullInjectorError: No provider for ViewportScroller! at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (http://localhost:8100/vendor.js:62254:25) at resolveToken (http://localhost:8100/vendor.js:63623:24) at tryResolveToken (http://localhost:8100/vendor.js:63567:16) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (http://localhost:8100/vendor.js:63471:20) at resolveToken (http://localhost:8100/vendor.js:63623:24) at tryResolveToken (http://localhost:8100/vendor.js:63567:16) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (http://localhost:8100/vendor.js:63471:20) at resolveNgModuleDep (http://localhost:8100/vendor.js:82413:29) at _callFactory (http://localhost:8100/vendor.js:82481:67) at _createProviderInstance (http://localhost:8100/vendor.js:82433:26)
Part of the package.json file is
“@angular/animations”: “^8.1.0”, “@angular/common”: “^8.1.0”, “@angular/core”: “^8.1.0”, “@angular/forms”: “^8.1.0”, “@angular/http”: “^7.2.15”, “@angular/platform-browser”: “^8.1.0”, “@angular/platform-browser-dynamic”: “^8.1.0”, “@angular/router”: “^8.1.0”, “@ionic-native/core”: “^5.9.0”, “@ionic/angular”: “^4.6.0”
Issue Analytics
- State:
- Created 4 years ago
- Reactions:13
- Comments:35 (10 by maintainers)
Top GitHub Comments
I am going to close this, because there is not sufficient information for us to understand and reproduce the problem. (Please check out our submission guidelines to understand why we can’t act on issues that are lacking important information.)
As mentioned in https://github.com/angular/angular/issues/31425#issuecomment-508773544, my best guess is that it is not a problem in Angular itself (but, again, we can’t be sure).
If the problem still exists in your application, please open a new issue and follow the instructions in the issue template.
Same issue here after install @angular/cdk