Skip to content

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

@jbuoncri1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions