0

I have installed react without problems using npx install, but when I try to install material-UI it does not install properly. Please see the code below

npm install @material-ui/core 
npm WARN saveError ENOENT: no such file or directory, open '/Users/alirahman/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/Users/alirahman/package.json'
npm WARN @material-ui/core@4.5.0 requires a peer of react@^16.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN @material-ui/core@4.5.0 requires a peer of react-dom@^16.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-transition-group@4.3.0 requires a peer of react@>=16.6.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-transition-group@4.3.0 requires a peer of react-dom@>=16.6.0 but none is installed. You must install peer dependencies yourself.
npm WARN @material-ui/styles@4.5.0 requires a peer of react@^16.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN @material-ui/styles@4.5.0 requires a peer of react-dom@^16.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN @material-ui/utils@4.4.0 requires a peer of react@^16.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN @material-ui/utils@4.4.0 requires a peer of react-dom@^16.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN @material-ui/system@4.5.0 requires a peer of react@^16.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN @material-ui/system@4.5.0 requires a peer of react-dom@^16.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN alirahman No description
npm WARN alirahman No repository field.
npm WARN alirahman No README data
npm WARN alirahman No license field.
HMR
  • 37,593
  • 24
  • 91
  • 160

1 Answers1

0

The issue I had was I had accidentally installed material ui core in my server side NPM folder as well as on the client side folder, so the server side npm module was looking for a version of react which didn't exist. Was it that simple?

John Shanks
  • 165
  • 9