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
'react-icons' module not found on server-side #235
Comments
How weird. My Next app was running on dev script. I installed 'react-icons' package. Hot reload implemented it. I got my icons displayed while I was working. But suddenly, after a page refresh or a npm run script refresh, I lost them and the app just couldn't find 'react-icons' |
I can confirm this behavior, as well. I believe it has something to do with IconContext.Provider. |
See comments here: #230 (comment) It's because of the double- |
Same here... if it helps last version usable is 3.6.0: 3.6.1 crashes and I confirm too it's sth with IconContext.Provider |
I have the same issue to. But, first i have trouble with styled-component when first render is not applied. when i use this tutorial, it's work |
The same here trying to work with Parcel bundler running my compiled server.ts :( |
Same here. Is there any workaround for this? Guess i will survive without this feature though. |
Minimal reproduction: Running @exogen's hypothesis in #230 (comment) seems accurate. I attempted consolidating the two package.json files and it seemed to resolve the issue in my project, although maybe it has unintended side effects: schnerd@df4e9f2 @kamijin-fanta thoughts about this approach? should I open a PR? |
I created a pull-request to solve this issue. I hope it is accepted Check out my PR |
I was able to fix the issue importing
Importing IconContext from react-icons/lib worked for me: import { IconContext } from "react-icons/lib" |
Can confirm this issue is still happening, and that the above solution of appending A little worried that when a fix gets merged, it'll break the Edit: This scenario mentioned by @Delkathes is exactly how I experienced the bug:
|
fix(build): add entry point. Solve issue #235
resolved in #273 |
I tried to implements this package on my NextJs project, but with latest version of react-icons the package is not found on server-side.
With 3.2.2 version it works.
I noticed a little difference between 3.2.2 and 3.7.0. The index.mjs is missing. Is related?
NextJs: 7.0.2
React: 16.4.2
Node: 10.14
The text was updated successfully, but these errors were encountered: