If I don't have prop-types under packages in package-lock.json, I get this error when I try to load any feather icons:
Import trace for requested module:
./node_modules/feather-icons-react/build/index.js
./src/app/page.tsx
⨯ ./node_modules/feather-icons-react/build/FeatherIcon.js:10:40
Module not found: Can't resolve 'prop-types'
This can be reproduced by running npx create-next-app@latest and declining the 'use ESLint' option since it adds prop-types as a dependency. page.tsx can be something like this:
import FeatherIcon from "feather-icons-react";
export default function Home() {
return (
<FeatherIcon icon="feather" />
);
}
If I don't have
prop-types
underpackages
inpackage-lock.json
, I get this error when I try to load any feather icons:This can be reproduced by running
npx create-next-app@latest
and declining the 'use ESLint' option since it addsprop-types
as a dependency.page.tsx
can be something like this: