SoftwareBrothers / better-docs

Beautiful toolbox for jsdoc generated documentation - with 'typescript', `category` and `component` plugins
MIT License
857 stars 127 forks source link

npm install fails with Conflicting peer dependency: react@18.3. #262

Open hsnMoghadasi opened 3 months ago

hsnMoghadasi commented 3 months ago

i got error while run npm install

$ npm install npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: patient@0.1.0 npm ERR! Found: react@18.3.1 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.2" from better-docs@2.7.3 npm ERR! node_modules/better-docs npm ERR! dev better-docs@"^2.7.3" 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 /home/gitlab-runner/.npm/eresolve-report.txt for a full report. npm ERR! A complete log of this run can be found in: npm ERR! /home/gitlab-runner/.npm/_logs/2024-06-12T16_26_42_736Z-debug-0.log

my package.json::::::

{ "name": "patient", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "dev-https": "local-ssl-proxy --source 3001 --target 3000", "dev-https-linux": "next dev -p 3001 & local-ssl-proxy --source 3000 --target 3001", "build": "next build", "start": "next start", "lint": "next lint", "cypress:open": "cypress open", "cypress:run": "cypress run" }, "dependencies": { "@babel/plugin-transform-class-properties": "^7.24.1", "@drsaina/ui-kit": "^0.1.22893-338f7a20", "@emotion/cache": "^11.10.7", "@hookform/resolvers": "^2.6.1", "@mui/base": "5.0.0-alpha.118", "@next/bundle-analyzer": "^14.2.3", "@reduxjs/toolkit": "^1.9.1", "@sentry/nextjs": "^7.68.0", "@tailwindcss/line-clamp": "^0.4.4", "@tanstack/react-query": "^4.35.0", "async-mutex": "^0.4.0", "axios": "^1.2.1", "file-loader": "^6.2.0", "firebase": "^10.10.0", "local-ssl-proxy": "^2.0.5", "moment": "^2.29.4", "moment-jalaali": "^0.9.6", "next": "^14.2.0", "next-fonts": "^1.5.1", "next-redux-wrapper": "^8.1.0", "nextjs-toploader": "^1.6.12", "node": "^18.17.0", "node-fetch": "^3.3.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-hook-form": "^7.11.1", "react-intersection-observer": "^9.4.4", "react-loading-skeleton": "^3.3.1", "react-redux": "^8.0.5", "react-toastify": "^9.1.3", "react-web-share": "^2.0.2", "redux-thunk": "^2.4.2", "sharp": "^0.32.1", "swiper": "^11.1.1", "undici": "^5.21.2", "web-vitals": "^3.1.0", "yup": "^0.32.11" }, "devDependencies": { "@babel/plugin-transform-class-properties": "^7.24.1", "postcss-import": "^15.1.0", "@types/node": "18.11.12", "@types/react-dom": "^18.0.9", "typescript": "4.9.4", "eslint-config-next": "^13.1.2", "eslint": "8.29.0", "@babel/core": "^7.20.5", "@babel/preset-env": "^7.20.2", "@babel/preset-typescript": "^7.18.6", "@svgr/webpack": "^7.0.0", "@tanstack/eslint-plugin-query": "^4.34.1", "@types/moment-jalaali": "^0.7.5", "@types/react": "^18.0.26", "@types/uuid": "^9.0.1", "autoprefixer": "^10.4.13", "babel-loader": "^8.3.0", "cypress": "^12.0.2", "eslint-plugin-react-hooks": "^4.6.0", "lodash": "^4.17.21", "next-compose-plugins": "^2.2.1", "nswag": "^13.18.2", "postcss": "^8.4.21", "tailwindcss": "^3.2.7", "ts-loader": "^9.4.2", "uuid": "^9.0.0" }, "packageManager": "yarn@3.0.0-rc.2" }

MohammadAlderson commented 3 months ago

Same here

hsnMoghadasi commented 3 months ago

i install better-docs@2.7.4-dev.1 and get this another error

npm install --save-dev better-docs@2.7.4-dev.1 npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: cosmiconfig@8.3.6 npm WARN Found: typescript@4.9.4 npm WARN node_modules/typescript npm WARN peerOptional typescript@">=3.3.1" from eslint-config-next@13.5.6 npm WARN node_modules/eslint-config-next npm WARN dev eslint-config-next@"^13.1.2" from the root project npm WARN 4 more (ts-api-utils, ts-loader, the root project, vue) npm WARN npm WARN Could not resolve dependency: npm WARN peerOptional typescript@">=4.9.5" from cosmiconfig@8.3.6 npm WARN node_modules/cosmiconfig npm WARN cosmiconfig@"^8.1.3" from @svgr/core@7.0.0 npm WARN node_modules/@svgr/core npm WARN 1 more (@svgr/plugin-svgo) npm WARN npm WARN Conflicting peer dependency: typescript@5.4.5 npm WARN node_modules/typescript npm WARN peerOptional typescript@">=4.9.5" from cosmiconfig@8.3.6 npm WARN node_modules/cosmiconfig npm WARN cosmiconfig@"^8.1.3" from @svgr/core@7.0.0 npm WARN node_modules/@svgr/core npm WARN 1 more (@svgr/plugin-svgo)

added 55 packages, removed 36 packages, and changed 85 packages in 45s

233 packages are looking for funding run npm fund for details

tlkahn commented 1 month ago

Same here...