I have react and react-dom 15.4.2 installed on the React starter kit I'm using and I'm trying to install material-ui; however, npm is telling me for the latest version of material UI (understandably) we need a higher version of React (16.0).
Is there a way for me to directly install the version of material-ui which is compatible with the dependencies currently existing in my package.json file? (i.e. I don't know which version this will be and I was wondering if there was a quick way to do this/look it up).
To check version numbers, run npm list @mui/material in the environment where you build your application and also in your deployment environment. You can also ensure the same version in different environments by specifying a specific MUI version in the dependencies of your package.
You can check the peerDependencies of a npm package with npm view <package-name>@<package version> peerDependencies
.
E.g. npm view [email protected] peerDependencies
would list
{ react: '^15.4.0',
'react-dom': '^15.4.0',
'react-tap-event-plugin': '^2.0.1' }
You still would have to look up the versions from their github.
You can install your specific material-ui/core version.
For example:
npm i @material-ui/[email protected]
or
npm install @material-ui/[email protected]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With