question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

StaticInjectorError(Platform: core)[RouterScroller -> ViewportScroller]

See original GitHub issue

Hi,

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:closed
  • Created 4 years ago
  • Reactions:13
  • Comments:35 (10 by maintainers)

github_iconTop GitHub Comments

9reactions
gkalpakcommented, Jul 8, 2019

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.

6reactions
bjcCincommented, Jul 5, 2019

Same issue here after install @angular/cdk

Read more comments on GitHub >

github_iconTop Results From Across the Web

NullInjectorError: No provider for ViewportScroller
When I serve the app, this is returned in the console: NullInjectorError: "StaticInjectorError(AppModule)[RouterScroller -> ViewportScroller]: ...
Read more >
Angular – NullInjectorError: No provider for ViewportScroller
When I serve the app, this is returned in the console: NullInjectorError: "StaticInjectorError(AppModule)[RouterScroller -> ViewportScroller]:
Read more >
Angular Router Scroller - StackBlitz
Starter project for Angular apps that exports to the Angular CLI.
Read more >
StaticInjectorError(ro): No Provider for | Angular : ng build --prod
fix #NullInjectorError # StaticInjectorError #provider In this video i will show you fix for angular staticinjectorerror nullinjectorerror no ...
Read more >
Falcon Sandbox v8.30 © Hybrid Analysis
... (),RouterScroller=function(){function RouterScroller(router,viewportScroller ... webpack_require__(299))}(0,function(exports,core,platform,rxjs,operators ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found