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(AppModule)[ctrl_ngx_emoji_mart_CategoryComponent -> EmojiFrequentlyService]:

See original GitHub issue

I’m having an issue in my angular app, I’m using v3.0.4 of emoji-mart.

This is a brand new issue I didn’t have previously, but I get the following error when trying to load it:

ERROR NullInjectorError: StaticInjectorError(AppModule)[ctrl_ngx_emoji_mart_CategoryComponent -> EmojiFrequentlyService]: 
  StaticInjectorError(Platform: core)[ctrl_ngx_emoji_mart_CategoryComponent -> EmojiFrequentlyService]: 
    NullInjectorError: No provider for EmojiFrequentlyService!
    at NullInjector.get (http://localhost:4200/main.ca53750b6edbc91605d8.js:1:674054)
    at http://localhost:4200/main.ca53750b6edbc91605d8.js:1:689033
    at tryResolveToken (http://localhost:4200/main.ca53750b6edbc91605d8.js:1:689713)
    at StaticInjector.get (http://localhost:4200/main.ca53750b6edbc91605d8.js:1:689930)
    at http://localhost:4200/main.ca53750b6edbc91605d8.js:1:689033
    at tryResolveToken (http://localhost:4200/main.ca53750b6edbc91605d8.js:1:689713)
    at StaticInjector.get (http://localhost:4200/main.ca53750b6edbc91605d8.js:1:689930)
    at resolveNgModuleDep (http://localhost:4200/main.ca53750b6edbc91605d8.js:1:724014)
    at NgModuleRef_.get (http://localhost:4200/main.ca53750b6edbc91605d8.js:1:738204)
    at resolveDep (http://localhost:4200/main.ca53750b6edbc91605d8.js:1:745748)

I’m loading it in app.module like so:

import { PickerModule } from "@ctrl/ngx-emoji-mart";
import { EmojiModule } from '@ctrl/ngx-emoji-mart/ngx-emoji'

and in my imports as

    PickerModule,
    EmojiModule,

and then my html just looks like this:

<emoji-mart
(emojiClick)="addEmoji($event)" size="16" title="Pick module icon" emoji="point_up"></emoji-mart>

I’m loading it with the MatBottomSheet from Angular material… Any idea why this might be happening?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
scttcpercommented, Jun 17, 2020

the last version that works with angular v8 is 1.0.6 https://github.com/TypeCtrl/ngx-emoji-mart#dependencies

0reactions
scttcpercommented, Jun 17, 2020

npm should warn you when you install them, but you can sometimes also find out by looking at peerDependencies

npm info @ctrl/ngx-emoji-mart peerDependencies
Read more comments on GitHub >

github_iconTop Results From Across the Web

StaticInjectorError(AppModule)[UserformService -> HttpClient ...
Simply i have import in appmodule.ts import { HttpClientModule } from '@angular/common/http'; imports: [ BrowserModule, FormsModule, ...
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