[Bug]: @carbon/icons-react : icon import error
See original GitHub issuePackage
Browser
Chrome
Package version
10.49.0 & 10.48.0
React version
17.0.2
Description
There is a problem that icons that do not require size specification (ex. status shap icon) are not imported properly.
Am I using it wrong?
import { CircleFillGlyph } from '@carbon/icons-react'
CodeSandbox example
Steps to reproduce
There is no error in the code above.
However, there is a problem that the import does not work properly in my current project.
This is my package.json dependencies
Code of Conduct
- I agree to follow this project’s Code of Conduct
- I checked the current issues for duplicate problems
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
[Bug]: SolarPanel32 icon is missing · Issue #10378
Import the icon like other carbon icons import {SolarPanel32} from '@carbon/icons-react'; , then following error comes Uncaught ...
Read more >Dynamic Import / Code Splitting inside a Library that is ...
The problem occurs when I try to import the Icon component in another ... They are at the same location that the error...
Read more >Icons – Carbon Design System
To install @carbon/icons-react in your project, you will need to run the following ... Icons in this package can be accessed through importing...
Read more >carbon/icons-react - npm Package Health Analysis
You can import an icon component intoo your project by referring to its name: import { Add } from '@carbon/icons-react';.
Read more >an error occurred while insert icon in microsoft office - TechNet
Hi JYser,. Did this problem appear in all files when trying to import to Office? How did you import files? I suggest you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@JWLK ah okay, thanks so much for the link! It may be that this icon is unavailable in the types for the package that come from DefinitelyTyped. Unfortunately, the TypeScript types for this package are community-maintained and are not something that we support at the moment.
Great questions, the latest for TypeScript will come up in this discussion: https://github.com/carbon-design-system/carbon/discussions/10752
At the moment, we definitely are relying on community contributions over in DefinitelyTyped. I believe that there is interest in maintaining TypeScript types in the future but there is no clear roadmap or plan for that at the moment.
Hope this helps!