Closed Ebbe closed 2 years ago
Interesting, marked this a bug. Found the docs, yeah will need to fix this:
https://github.com/facebook/prop-types#how-to-depend-on-this-package
I ran into this problem as well because I'm using Yarn PnP for my project. In that case, adding prop-types
to your app's top-level dependencies is not sufficient because Yarn PnP is very strict about packages declaring their dependencies. Additionally, @mdi/react
also depends on react
without declaring it.
The workaround for me was to add this to the packageExtensions
section of my root .yarnrc.yml
:
'@mdi/react@*':
dependencies:
prop-types: '^15.5.7'
react: '*'
then how to resolve this?
Stumbled across this today as the fix is not published on npm. Any plans to release the fix?
This library is dependent of 'prop-types'. Either loose the dependency, or add it as one in package.js instead of a devDependency.
Error after installing @mdi/react and @mdi/js to my app and starting it:
Though it is easily fixed on my side by adding 'prop-types' to my own app.