ecronix / react-most-wanted

React starter kit with "Most Wanted" application features
https://www.react-most-wanted.com/
MIT License
2.43k stars 458 forks source link

npx create-react-app error #407

Closed aklusa022 closed 2 years ago

aklusa022 commented 2 years ago

npx create-react-app my-app --template material-ui Creating a new React app in C:\Users\sajaw\OneDrive\Portfolio\cero-verse\cero-verse-ui.

Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template-material-ui...

added 1392 packages in 4m

203 packages are looking for funding run npm fund for details

Installing template dependencies using npm... npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: cero-verse-ui@0.1.0 npm ERR! Found: react@18.2.0 npm ERR! node_modules/react npm ERR! react@"18.x" from the root project npm ERR! peer react@"18.x" from material-ui-shell@3.4.0 npm ERR! node_modules/material-ui-shell npm ERR! material-ui-shell@"3.x" from the root project npm ERR! 5 more (@emotion/react, @emotion/styled, @mui/icons-material, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^17.0.0" from @mui/styles@5.9.0 npm ERR! node_modules/@mui/styles npm ERR! @mui/styles@"5.x" from the root project npm ERR! peer @mui/styles@"5.x" from material-ui-shell@3.4.0 npm ERR! node_modules/material-ui-shell npm ERR! material-ui-shell@"3.x" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See C:\Users\sajaw\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\sajaw\AppData\Local\npm-cache_logs\2022-07-16T11_58_03_511Z-debug-0.log npm install --no-audit --save material-ui-shell@3.x @emotion/styled@11.x @fontsource/roboto@4.x @mui/icons-material@5.x @mui/material@5.x @mui/styles@5.x base-shell@2.x intl@1.x jss-rtl@0.x notistack@2.x react@18.x react-custom-scrollbars-2@4.x react-dom@18.x react-easy-crop@4.x react-intl@6.x react-ios-pwa-prompt@1.x react-markdown@^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 react-router-dom@6.x react-virtualized-auto-sizer@1.x react-window@1.x failed

miketwheeler commented 2 years ago

I am also receiving the same error, did you find any workarounds?

JoshuaSmeda commented 2 years ago

I have the same error too. No workaround yet.

aklusa022 commented 2 years ago

retards am i rigbt

On Tue, Aug 2, 2022, 12:56 Joshua Smeda @.***> wrote:

I have the same error too. No workaround yet.

— Reply to this email directly, view it on GitHub https://github.com/TarikHuber/react-most-wanted/issues/407#issuecomment-1203042387, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARAA37RWYPDMI44O6PYA5N3VXFOLRANCNFSM54NAHZGQ . You are receiving this because you authored the thread.Message ID: @.***>

sinuheg commented 2 years ago

Same error, waiting for a workaround.

aklusa022 commented 2 years ago

nein, same shit

On Wed, Jul 27, 2022, 19:39 Michael Wheeler @.***> wrote:

I am also receiving the same error, did you find any workarounds?

— Reply to this email directly, view it on GitHub https://github.com/TarikHuber/react-most-wanted/issues/407#issuecomment-1197522162, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARAA37UGC5VWTS7V5GKU2JLVWHJDPANCNFSM54NAHZGQ . You are receiving this because you authored the thread.Message ID: @.***>

TarikHuber commented 2 years ago

@aklu0830 watch your words pls if you don't like this project just leave.

Carr1005 commented 2 years ago

Hi @TarikHuber ! First of all, thanks for building these convenient templates with enhancements :raised_hands: Your latest commits has fixed the problems of creating project with cra-template-material-ui (At least for me!). I saw you also updated the dependencies for cra-template-rmw and there was an update on NPM so I gave it a try, I guess it's not done yet so the same error still happens there? Very appreciate your effort on this, just for my own curiosity and want to learn from this project. For material-ui-shell and cra-template-material-ui, I saw you have done the migration to MUI v5 and you don't use @mui/styles anymore (against the deprecation):

  1. I guess the reason that @mui/styles is still in the both package.json is for backward compatibility?

  2. After I create the project with npx create-react-app my-app --template material-ui, the only missed dependency in package.json is @mui/styles. As long as I've known, create-react-app should move all the dependencies in template.json to the new project and install them. What's the mechanism or magic here?

Thanks and sorry! I am not sure if here is a proper place to ask these questions :pray:

TarikHuber commented 2 years ago

Hi @Carr1005 and thx.

@mui/styles should be removed completely from the material-ui package and template. If there is still something left over I just missed it.

I'm still struggling with the rmw package. There are to many outdated packages and those that just don't work well together according to peer dependencies. That was no problem with the legacy npm peer dependency management. This new one is doing my work here like Sisyphus. Actually, I'm not sure if it is possible for rmw at all to accomplish this. I will give it a try these days.

Thx for using the templates. Makes me very happy to see that ppl can use it :)

TarikHuber commented 2 years ago

Unfortunately the rmw template has to much dependencies to make the peer dependencies work well together. The workaround for this is to enable the legacy peer dependencies on your device with this command: npm config set legacy-peer-deps true and then to run the installation of the template. You can find more about that here

Carr1005 commented 2 years ago

@TarikHuber , thanks for your reply! Your answer is very helpful and saves me a lot of time! Again, I really appreciate this project and hope I can make some contributions to it at some point.

TarikHuber commented 2 years ago

@Carr1005 you are always welcome to contribute to it :)