Gbuomprisco / ngx-chips

Tag Input component for Angular
MIT License
902 stars 359 forks source link

StaticInjectorError(AppModule)[TagInputComponent -> DragProvider]in angular7 #884

Closed EnochGao closed 2 years ago

EnochGao commented 5 years ago
ERROR Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[TagInputComponent -> DragProvider]: 
  StaticInjectorError(Platform: core)[TagInputComponent -> DragProvider]: 
    NullInjectorError: No provider for DragProvider!
Error: StaticInjectorError(AppModule)[TagInputComponent -> DragProvider]: 
  StaticInjectorError(Platform: core)[TagInputComponent -> DragProvider]: 
    NullInjectorError: No provider for DragProvider!
    at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (core.js:8894)
    at resolveToken (core.js:9139)
    at tryResolveToken (core.js:9083)
    at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8980)
    at resolveToken (core.js:9139)
    at tryResolveToken (core.js:9083)
    at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8980)
    at resolveNgModuleDep (core.js:21120)
    at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:21809)
    at resolveNgModuleDep (core.js:21120)
    at resolvePromise (zone.js:831)
    at resolvePromise (zone.js:788)
    at zone.js:892
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
    at Object.onInvokeTask (core.js:17280)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:422)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:195)
    at drainMicroTaskQueue (zone.js:601)
    at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:502)
    at invokeTask (zone.js:1744)
defaultErrorLogger @ core.js:15714
push../node_modules/@angular/core/fesm5/core.js.ErrorHandler.handleError @ core.js:15762
next @ core.js:17761
schedulerFn @ core.js:13504
push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub @ Subscriber.js:196
push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.next @ Subscriber.js:134
push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._next @ Subscriber.js:77
push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:54
push../node_modules/rxjs/_esm5/internal/Subject.js.Subject.next @ Subject.js:47
push../node_modules/@angular/core/fesm5/core.js.EventEmitter.emit @ core.js:13488
(anonymous) @ core.js:17311
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:391
push../node_modules/zone.js/dist/zone.js.Zone.run @ zone.js:150
push../node_modules/@angular/core/fesm5/core.js.NgZone.runOutsideAngular @ core.js:17248
onHandleError @ core.js:17311
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.handleError @ zone.js:395
push../node_modules/zone.js/dist/zone.js.Zone.runGuarded @ zone.js:164
_loop_1 @ zone.js:694
api.microtaskDrainDone @ zone.js:703
drainMicroTaskQueue @ zone.js:608
push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask @ zone.js:502
invokeTask @ zone.js:1744
globalZoneAwareCallback @ zone.js:1770

how to resolve

dineshmaths1 commented 4 years ago

same issue am facing any solution ?

dineshmaths1 commented 4 years ago

I am resolved :)

poddarkhushbu07 commented 4 years ago

@dineshmaths1 Can you share the solution here? I am too stuck here with this error.

pratiknator44 commented 4 years ago

Im facing the same problem, any who knows any solution please share

karenraiany commented 3 years ago

I corrected putting in app.module the tagInputModule.

Prasad814359 commented 3 years ago

Is there any other way ? rather than importing in app.module

amaneer94 commented 2 years ago

I have faced the same issue. Is there any follow-up on it except importing TagInputModule in app.module.ts?