codedthemes / berry-free-react-admin-template

Berry free react material-ui admin template for easing and faster web development.

Home Page:https://berrydashboard.io/free/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot install with set dependencies

karthikc08 opened this issue Β· comments

When i install the dependencies i get the below error. Need to use right dependency versions in the code.

While resolving: berry-material-react-free@3.2.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR! react@"^18.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.0" from @mui/styles@5.8.6
npm ERR! node_modules/@mui/styles
npm ERR! @mui/styles@"^5.8.6" 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\HP\AppData\Local\npm-cache\eresolve-report.txt for a full report.

@karthikc08
During installation run the following:

npm i --legacy-peer-deps

Info:

--legacy-peer-deps: ignore all peerDependencies when installing, 
in the style of npm version 4 through version 6.

--strict-peer-deps: fail and abort the install process for any conflicting peerDependencies
when encountered. By default, npm will only crash for peerDependencies conflicts caused by 
the direct dependencies of the root project.

try --force before --legacy-peer-deps
commented

@karthikc08 During installation run the following:

npm i --legacy-peer-deps

Info:

--legacy-peer-deps: ignore all peerDependencies when installing, 
in the style of npm version 4 through version 6.

--strict-peer-deps: fail and abort the install process for any conflicting peerDependencies
when encountered. By default, npm will only crash for peerDependencies conflicts caused by 
the direct dependencies of the root project.

try --force before --legacy-peer-deps

this did not help

@karthikc08 During installation run the following:

npm i --legacy-peer-deps

Info:

--legacy-peer-deps: ignore all peerDependencies when installing, 
in the style of npm version 4 through version 6.

--strict-peer-deps: fail and abort the install process for any conflicting peerDependencies
when encountered. By default, npm will only crash for peerDependencies conflicts caused by 
the direct dependencies of the root project.

try --force before --legacy-peer-deps

this did not help

That is strange, when I cloned the repository and ran the command it started installing everything.
Please comment the commands and steps you did before you had the error.

commented

Sure, @NorkzYT !

my env:
MacOsX (brew)
yarn -v: 3.0.2
npm -v: 8.19.1

Previously, i've got same error as @karthikc08
(with --strict-peer-deps mode)

after npm i --legacy-peer-deps

run "yarn install" -- got exceptions:

➀ YN0070: Migrating from Yarn 1; automatically enabling the compatibility node-modules linker πŸ‘

➀ YN0000: β”Œ Resolution step
➀ YN0032: β”‚ fsevents@npm:2.3.2: Implicit dependencies on node-gyp are discouraged
➀ YN0032: β”‚ fsevents@npm:2.3.2: Implicit dependencies on node-gyp are discouraged
➀ YN0061: β”‚ core-js-pure@npm:3.18.3 is deprecated: core-js-pure@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js-pure.
➀ YN0061: β”‚ svgo@npm:1.3.2 is deprecated: This SVGO version is no longer supported. Upgrade to v2.x.x.
➀ YN0061: β”‚ stable@npm:0.1.8 is deprecated: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
➀ YN0002: β”‚ berry-material-react-free@workspace:. doesn't provide @babel/plugin-syntax-flow (p50b56), requested by eslint-plugin-flowtype
➀ YN0002: β”‚ berry-material-react-free@workspace:. doesn't provide @babel/plugin-transform-react-jsx (p3b55d), requested by eslint-plugin-flowtype
➀ YN0002: β”‚ berry-material-react-free@workspace:. doesn't provide @typescript-eslint/eslint-plugin (pe700d), requested by eslint-config-airbnb-typescript
➀ YN0002: β”‚ berry-material-react-free@workspace:. doesn't provide @typescript-eslint/parser (p66354), requested by eslint-config-airbnb-typescript
➀ YN0060: β”‚ berry-material-react-free@workspace:. provides react (p4be56) with version 18.2.0, which doesn't satisfy what @mui/styles and some of its descendants request
➀ YN0002: β”‚ eslint-config-react-app@npm:7.0.1 [7864f] doesn't provide @babel/plugin-syntax-flow (pdb9d4), requested by eslint-plugin-flowtype
➀ YN0002: β”‚ eslint-config-react-app@npm:7.0.1 [7864f] doesn't provide @babel/plugin-transform-react-jsx (pce866), requested by eslint-plugin-flowtype
➀ YN0002: β”‚ eslint-config-react-app@npm:7.0.1 [c12c9] doesn't provide @babel/plugin-syntax-flow (p5dbc7), requested by eslint-plugin-flowtype
➀ YN0002: β”‚ eslint-config-react-app@npm:7.0.1 [c12c9] doesn't provide @babel/plugin-transform-react-jsx (pf6bf4), requested by eslint-plugin-flowtype
➀ YN0002: β”‚ material-ui-popup-state@npm:4.0.1 [7864f] doesn't provide react-dom (pfa915), requested by @mui/material
➀ YN0002: β”‚ react-dev-utils@npm:12.0.1 doesn't provide typescript (p59348), requested by fork-ts-checker-webpack-plugin
➀ YN0002: β”‚ react-dev-utils@npm:12.0.1 doesn't provide webpack (p1012e), requested by fork-ts-checker-webpack-plugin
➀ YN0000: β”‚ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➀ YN0000: β”” Completed in 7s 882ms
➀ YN0000: β”Œ Fetch step
➀ YN0013: β”‚ @babel/helper-validator-option@npm:7.18.6 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ @babel/helper-wrap-function@npm:7.15.4 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ @babel/helper-wrap-function@npm:7.18.6 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ @babel/helpers@npm:7.15.4 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ @babel/helpers@npm:7.18.6 can't be found in the cache and will be fetched from the remote registry
➀ YN0001: β”‚ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
    at new NodeError (node:internal/errors:393:5)
    at PassThrough.onclose (node:internal/streams/end-of-stream:142:30)
    at PassThrough.emit (node:events:513:28)
    at emitCloseNT (node:internal/streams/destroy:132:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
➀ YN0013: β”‚ @babel/highlight@npm:7.14.5 can't be found in the cache and will be fetched from the remote registry
➀ YN0001: β”‚ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
    at new NodeError (node:internal/errors:393:5)
    at PassThrough.onclose (node:internal/streams/end-of-stream:142:30)
    at PassThrough.emit (node:events:513:28)
    at emitCloseNT (node:internal/streams/destroy:132:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
➀ YN0013: β”‚ @babel/highlight@npm:7.18.6 can't be found in the cache and will be fetched from the remote registry
➀ YN0001: β”‚ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
    at new NodeError (node:internal/errors:393:5)
    at PassThrough.onclose (node:internal/streams/end-of-stream:142:30)
    at PassThrough.emit (node:events:513:28)
    at emitCloseNT (node:internal/streams/destroy:132:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
➀ YN0013: β”‚ @babel/parser@npm:7.15.8 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ @babel/parser@npm:7.18.6 can't be found in the cache and will be fetched from the remote registry
➀ YN0013: β”‚ @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.18.6 can't be found in the cache and will be fetched from the remote registry
➀ YN0001: β”‚ Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close

... and 1000+ log's rows

Maybe there is a something with npm/yarn setup, but playing with reinstalling - without success...

What is your node version?
You can check with node -v in your command line.

I recommend upgrading node, npm, & yarn to the latest version.

I have found other users having similar issues.
facebook/create-react-app#12456
https://stackoverflow.com/a/70254623/19395252

commented

node -v: v18.9.0

The only thing I can think of at the moment is modifying the package.json, and do what the logs say or take a look at the links I sent in my above comment to see if any of the responses help you fix this.

@karthikc08 During installation run the following:

npm i --legacy-peer-deps

Info:

--legacy-peer-deps: ignore all peerDependencies when installing, 
in the style of npm version 4 through version 6.

--strict-peer-deps: fail and abort the install process for any conflicting peerDependencies
when encountered. By default, npm will only crash for peerDependencies conflicts caused by 
the direct dependencies of the root project.

try --force before --legacy-peer-deps

It'work for me

npm i --legacy-peer-deps
Info:

--legacy-peer-deps: ignore all peerDependencies when installing,
in the style of npm version 4 through version 6.

--strict-peer-deps: fail and abort the install process for any conflicting peerDependencies
when encountered. By default, npm will only crash for peerDependencies conflicts caused by
the direct dependencies of the root project.

try --force before --legacy-peer-deps