Open Billocap opened 1 month ago
Hi, we are facing the same issue:
The reason behind it is the incompatibility between NextJS and React-Icons in this file :
index.ts
export * from "./iconsManifest";
export * from "./iconBase";
export * from "./iconContext";
If we add pages
folder the issue went but it is not the right solution.
I managed to fix it by changing the way you import icons in your components. Try to use this one: https://github.com/react-icons/react-icons?tab=readme-ov-file#installation-for-meteorjs-gatsbyjs-etc
The solution proposed by @vadim-givola worked.
Does it also solve the performance issue? Like the one mentioned here https://github.com/vercel/next.js/issues/48748
PS: I updated the version of node in the sample repository also I left the fix in a separate branch called bugfix-proposed-fix
Describe the bug
The following error message appeared when I tried running a Cypress spec that used one of the icons from
react-icons
:The conflict appears to be between Cypress and React-Icons once the page rendered by next at
http://localhost:3000
opens without issues.Expected behavior
The spec should have run without errors.
Minimal sample repository URL
https://github.com/Billocap/react-icons-cypress-next-bug
Steps To Reproduce
pnpm run test
ComponentName.cy.js
Package version
v5.1.0
Relevant log output
No response
Additional context
pnpm@8.15.3 node@18.17.0
Related to https://github.com/react-icons/react-icons/discussions/933