Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Tracked by #5419 ...
jbuoncri1 opened this issue Oct 21, 2021 · 8 comments
Open
Tracked by #5419 ...

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

jbuoncri1 opened this issue Oct 21, 2021 · 8 comments
Labels
task A task associated with a larger Meta issue typescript

Comments

@jbuoncri1
Copy link

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

@cee-chen
Copy link
Member

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)

@jbuoncri1
Copy link
Author

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

@cee-chen
Copy link
Member

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

@github-actions
Copy link

👋 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.

@github-actions
Copy link

👋 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.

@cee-chen
Copy link
Member

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).

@github-actions
Copy link

👋 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.

@cee-chen
Copy link
Member

Still valid 😬

@JasonStoltz JasonStoltz added the task A task associated with a larger Meta issue label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task A task associated with a larger Meta issue typescript
Projects
None yet
Development

No branches or pull requests

3 participants