最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - npm install material-ui does not install the latest version - Stack Overflow

programmeradmin1浏览0评论

I have an abandoned project which is the admin tool for a current project. This project's Material-UI version was 0.19.4. When I delete the dependency from package.json and run npm install, it installs the version "material-ui": "^0.20.2", Also when i edit my package.json, Material-UI's version by hand to version "^1.0.0" the npm crashes: No matching version found for [email protected]. What am I missing? Why is the latest version not installed or at least the desired version? Can anyone guide me how to approach the issue?

Side note: When I run the project with the outdated Material-UI, it is not showing as the outdated version.

I have an abandoned project which is the admin tool for a current project. This project's Material-UI version was 0.19.4. When I delete the dependency from package.json and run npm install, it installs the version "material-ui": "^0.20.2", Also when i edit my package.json, Material-UI's version by hand to version "^1.0.0" the npm crashes: No matching version found for [email protected]. What am I missing? Why is the latest version not installed or at least the desired version? Can anyone guide me how to approach the issue?

Side note: When I run the project with the outdated Material-UI, it is not showing as the outdated version.

Share Improve this question edited Dec 13, 2019 at 12:37 minus.273 77713 silver badges26 bronze badges asked Dec 13, 2019 at 9:47 RamAlxRamAlx 7,34424 gold badges64 silver badges110 bronze badges 2
  • no i dont need @angular/material, i'm running a react project. Why should i try this? – RamAlx Commented Dec 13, 2019 at 9:53
  • See stackoverflow./questions/57264842/… – Ryan Cogswell Commented Dec 13, 2019 at 15:34
Add a ment  | 

5 Answers 5

Reset to default 4

The newer ponents are now in @material-ui/core

see: https://material-ui./guides/migration-v0x/

npm install @material-ui/core

OR

yarn add @material-ui/core

There are some factors that may be causing the installation to fail. One that I know is maybe the version of npm is not the latest.

Try:

$ npm -g install npm

After that, try installing material-ui again. That would work.

I faced the same problem but I manage it by the following mand

npm install --save --legacy-peer-deps @material-ui/core

!use at your own risk.

Run this:

npm config set legacy-peer-deps true

//then install your npm

发布评论

评论列表(0)

  1. 暂无评论