0

I've just created a new React app using Create React App. When I went to install Matrial UI, I received the following error message:

Link to image of console

Other packages are able to be installed just fine. Is this an issue with React 17? Should I rollback to an earier version? I use React and Material UI daily at work, but this was on an app created back in June.

EDIT: I've attempted to delete the node modules folder and re-install, but no luck.

3 Answers 3

1

I think you just misspelled the command to install the package. You put: npm i npm install @material-ui/core You should insert: npm i @material-ui/core or npm install @material-ui/core

Sign up to request clarification or add additional context in comments.

3 Comments

That was actually an additional typo from having tried half a dozen different soltuons. I've added a new image without the typo, and you can see the issue persists.
@BenJones I tried here and this command works fine. I think your nodejs is outdated. Try to update your nodejs and npm
I'm running v15.0.1, which is the latest version. Based on the error, and the fact that I can still install other packages into the project, I feel like this is something to do with Material UI and React not getting along.
0

So it turns out the issue was caused by the fact that I was using the 'latest' version of Node, that being 15.0.1. I installed the LTS version, currently 12.19.0, and Material UI now installs and works correctly.

Comments

0

I got the same problem when I install it with NPM. I solved this issues with yarn instead of npm.

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.