Skip to content

ts(7016) error when trying to import icons #5305

Closed

Description

@jbuoncri1

Hello all,

I'm following the Getting Started page and am on the section of Failing Icons, as when I try and use them the console throws an error saying the icons cannot be found. After copying/pasting the sample code for appending the icon component cache I get this error:

Could not find a declaration file for module '@elastic/eui/es/components/icon/icon'. '/Users/jbuoncri/workspace/Symphony-Cerebrum/syc-ui/node_modules/@elastic/eui/es/components/icon/icon.js' implicitly has an 'any' type. Try npm i --save-dev @types/elastic__euiif it exists or add a new declaration (.d.ts) file containingdeclare module '@elastic/eui/es/components/icon/icon';``

Here's what my code looks like. The message above appears when hovering over the error:

Screen Shot 2021-10-20 at 5 27 19 PM

Activity

  1. cee-chen commented on Oct 21, 2021

    @cee-chen
    Contributor

    Hey hey! Just wanted to let you know we can confirm this is an issue - if possible you should @ts-expect-error or @ts-ignore this for now! We can look into getting module declarations for server-side icon loading in the future, or possibly re-evaluating SSR icons (cc @chandlerprall)

  2. jbuoncri1 commented on Oct 21, 2021

    @jbuoncri1
    Author

    Thank you @constancecchen. Would you like me to close this issue?

  3. cee-chen commented on Oct 21, 2021

    @cee-chen
    Contributor

    You can leave it open - we'd definitely like to fix this so consumers don't have to ignore these Typescript errors!

  4. github-actions commented on Apr 20, 2022

    @github-actions

    👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

  5. added
    stale-issue
    on Apr 20, 2022
  6. added and removed
    stale-issue
    on Apr 20, 2022
  7. github-actions commented on Apr 19, 2023

    @github-actions

    👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed.

  8. added
    stale-issue
    on Apr 19, 2023
  9. cee-chen commented on Apr 19, 2023

    @cee-chen
    Contributor

    Commenting to bump the stale bot. The EUI team does intend to more actively support SSR (#5419) as well as other environments (#2760) as part of our upcoming roadmap (in the next ~1 year).

  10. removed
    stale-issue
    on Apr 19, 2023
  11. github-actions commented on Oct 22, 2023

    @github-actions

    👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed.

  12. added
    stale-issue
    on Oct 22, 2023
  13. 2 remaining items

  14. added
    Stale
    on Oct 4, 2024
  15. removed
    Stale
    on Oct 14, 2024
  16. removed theissue type on Mar 25, 2025
  17. added theissue type on Mar 25, 2025
  18. github-actions commented on Sep 22, 2025

    @github-actions

    👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed.

  19. added
    stale-issue
    on Sep 22, 2025
  20. JasonStoltz commented on Dec 15, 2025

    @JasonStoltz
    Contributor

    Closing this old issue as it has gone stale. Feel free to re-open it if you feel it is still important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stale-issuetypescript

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions