0

I am installing material-ui: npm install @material-ui/core (which is the latest version) for React. I got the latest npm version (npm i -g npm, which is now + npm@6.1.0). And I also have tried: npm install --save material-ui.

But it always keeps showing me this:

$ npm install @material-ui/core

npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.

  • @material-ui/core@1.2.1 updated 1 package and audited 14597 packages in 8.235s found 0 vulnerabilities.

I don't know if this is a material-ui latest version problem? or it is the latest npm problem? So, how do I proceed to install the material-ui for React?

mengru zhang
  • 379
  • 3
  • 9

1 Answers1

0

You need to install ajv@^6.0.0

npm install -S ajv@^6.0.0

Edit: to add to this, as described in this post, it seems that npm removed the automatic installation of peer dependencies on npm 3, but if you'd like that to be taken care of automatically, you can use npm-install-peers

theJuls
  • 6,788
  • 14
  • 73
  • 160