teaguestockwell / react-icon-cloud

React component for rendering an interactive img or word cloud on canvas
MIT License
38 stars 4 forks source link

Wrong imports ? #4

Open valentinllpz opened 1 year ago

valentinllpz commented 1 year ago

Hello,

I am very interested in using this package because it really looks awesome ! However I can't get it to work because imports seem broken. I tried to downgrade Simple-Icons to the same version as your code sandbox example but it still does not work, I get the following issue: TypeError: (0 , react_icon_cloud__WEBPACK_IMPORTED_MODULE_2__.renderSimpleIcon) is not a function

My package.json setup : [...]

   "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-icon-cloud": "^4.1.4",
    "simple-icons": "^5.12.0"
teaguestockwell commented 1 year ago

Can you create a code sandbox to reproduce this? I made one here but cant repro the webpack issue

valentinllpz commented 1 year ago

Codesandbox : https://codesandbox.io/s/issue-react-icons-sphere-fyz8wo

The message is more explicit when trying to use it with NextJS + TS on my computer:

image

Also, if you try to edit your sandbox and update the simple-icons package to latest it won't work.