creativetimofficial / ct-nextjs-material-dashboard-pro

NextJS version of Material Dashboard PRO
https://demos.creative-tim.com/nextjs-material-dashboard-pro/admin/dashboard
16 stars 7 forks source link

[Bug] Failed to install due to ERESOLVE Found: react@17.0.2 expected react@"^0.14.9 || ^15.3.0 || ^16.0.0" package.json has 17.02 as the version being installed #24

Closed flashcma closed 1 year ago

flashcma commented 2 years ago

Version

2.0.0

Reproduction link - WILL NOT INSTALL - EXPECTED https://demos.creative-tim.com/nextjs-material-dashboard-pro/dashboards/sales

Operating System

windows 10

Device

chrome

Browser & Version

Version 103.0.5060.114 (Official Build) (64-bit)

Steps to reproduce

  1. Download NextJS Material Dashboard 2 PRO
  2. Unzip and run npm install Fails right there with npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: nextjs-material-dashboard-2-pro@1.0.0 npm ERR! Found: react@17.0.2 npm ERR! node_modules/react npm ERR! react@"17.0.2" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^0.14.9 || ^15.3.0 || ^16.0.0" from react-quill@1.3.5 npm ERR! node_modules/react-quill npm ERR! react-quill@"1.3.5" from the root project

    What is expected?

    A working product

    What is actually happening?

    A non working product


Solution

Update to react 17.0.2 since react 18 is now out and this product is running 16???

Additional comments

williamohara commented 1 year ago

@flashcma

hi - i got the same thing - but i ran npm run install:peer-deps first and it runs fine.

Although I agree with the sentiment here. dependencies should never be more than one major version behind IMO. Especially on a purchased template

I just carved out react-quill (from the ecommerce/product/edit and new pages) and completely removed the MDEditor component. it all installed nicely with 0 vulnerabilities or errors. I don't need a real text editor for my project anyway.

richardpickett commented 1 year ago

At a minimum, the instructions need to be updated, since following them exactly as written produces the error:

Terminal Commands

Download and Install NodeJs LTS version from NodeJs Official Page. Navigate to the root ./ directory of the product and run yarn install or npm install to install our local dependencies.

sajadevo commented 1 year ago

Hey there,

We've updated the product and now it's updated to Next.js 13 and this issue is fixed as well. please update to the latest version (v2.1.0)

Regards, Sajad