Directory import is not supported resolving ES modules when importing react-icons
#7451
-
I got 'Directory import is not supported resolving ES modules' error when I try to import // /app/routes/test-icons.tsx
import { FaLock } from 'react-icons/fa' // this line produces error (it's what react-icons doc suggests)
// import { FaLock } from 'react-icons/fa/index.js' // this line doesn't produce error
export default function TestIconsRoute() {
return <FaLock />
}
Context: I am using Remix v2.0.0 and I'm a bit new to web dev. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
This started breaking from v2.0.0. Here is reproducible repo with just basic setup https://github.com/abdulkader/remix-admin-template |
Beta Was this translation helpful? Give feedback.
-
@off99555 I have resolved the issue by adding the option |
Beta Was this translation helpful? Give feedback.
-
https://github.com/mui/material-ui/tree/master/examples/material-ui-remix-ts |
Beta Was this translation helpful? Give feedback.
-
This has been fixed by react-icons ... just upgrade to v5 |
Beta Was this translation helpful? Give feedback.
This has been fixed by react-icons ... just upgrade to v5
react-icons/react-icons#717