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.

Angular 5.2.7: No Provider for NgZone

See original GitHub issue

I get the following error and i can’t figure out why:

FileDropComponent.html:2 ERROR Error: StaticInjectorError(AppModule)[FileComponent -> NgZone]: StaticInjectorError(Platform: core)[FileComponent -> NgZone]: NullInjectorError: No provider for NgZone! at _NullInjector.get (core.js:1002) at resolveToken (core.js:1300) at tryResolveToken (core.js:1242) at StaticInjector.get (core.js:1110) at resolveToken (core.js:1300) at tryResolveToken (core.js:1242) at StaticInjector.get (core.js:1110) at resolveNgModuleDep (core.js:10854) at NgModuleRef_.get (core.js:12087) at resolveDep (core.js:12577)

dependencies: "@angular/animations": "^5.2.0", "@angular/common": "^5.2.0", "@angular/compiler": "^5.2.0", "@angular/core": "^5.2.0", "@angular/forms": "^5.2.0", "@angular/http": "^5.2.0", "@angular/platform-browser": "^5.2.0", "@angular/platform-browser-dynamic": "^5.2.0", "@angular/router": "^5.2.0", "core-js": "^2.4.1", "ngx-file-drop": "^2.0.5", "primeng": "^5.2.0", "rxjs": "^5.5.6", "zone.js": "^0.8.19"

Angular version: 5.2.7

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
marekalgoudcommented, May 2, 2018

For information, I had the same issue here. I’m using webpack as @jacobbutton to compile my project. Delete manually the node_modules folder from the ngx-file-drop directory works locally, but it’s not a suitable solution in our devops context… I’ve updaded angular from 5.1 to 5.2 (following this instructions : https://angular-update-guide.firebaseapp.com/) and it works fine now. Thanks for your works !

0reactions
jacobbuttoncommented, Apr 25, 2018

I’ve been having the same error for about the past few weeks after upgrading angular. I think there’s a conflict between my applications angular version and the angular version of ngx-file-drop.

The work around I’ve been using so far is removing ngx-file-drop’s node_modules folder before running webpack and compiling my application.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NullInjectorError: No provider for NgZone - Stack Overflow
I found temporary solution... My angular library with node_modules symlink from angular-cli preview app works fine.
Read more >
NgZone - Angular
Angular is a platform for building mobile and desktop web applications. Join the community of millions of developers who build compelling user interfaces ......
Read more >
Upgrade Angular 4 app to Angular 5 with Visual Studio 2017
Find out how to upgrade Angular 4 app to Angular 5 with Visual Studio 2017. Fix for “NodeInvocationException: No provider for PlatformRef!”
Read more >
angular/angular - Gitter
as instantiating the module creates some providers eagerly. // So we create a mini parent injector that just contains the new NgZone and ......
Read more >
angular/core - UNPKG
The CDN for @angular/core. ... 74, constructor(componentRef, ngZone, _autoDetect) { ... 789, * whose providers will also be added to the injector.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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