berry-free-react-admin-template
berry-free-react-admin-template copied to clipboard
Cannot install with set dependencies
When i install the dependencies i get the below error. Need to use right dependency versions in the code.
While resolving: [email protected] npm ERR! Found: [email protected] 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/[email protected] 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
@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.
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. https://github.com/facebook/create-react-app/issues/12456 https://stackoverflow.com/a/70254623/19395252
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