English 中文(简体)
零时安装成套设备。 json Depends - ERESOLVE 无法解决依赖树
原标题:Error when npm installing package.json dependencies - ERESOLVE unable to resolve dependency tree

update 1

when I use this command npm install --legacy-peer-deps . I am getting the below error, can you let me know how to fix it.

npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:SportsUIsports-ui-repository
ode_modulesgifsicle
npm ERR! command failed
npm ERR! command C:windowssystem32cmd.exe /d /s /c node lib/install.js
npm ERR! (node:45060) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR!   ‼ read ECONNRESET
npm ERR!   ‼ gifsicle pre-build test failed
npm ERR!   i compiling from source
npm ERR!   × Error: Command failed: C:windowssystem32cmd.exe /s /c "autoreconf -ivf"
npm ERR!  autoreconf  is not recognized as an internal or external command,
npm ERR! operable program or batch file.
npm ERR!
npm ERR!
npm ERR!     at C:SportsUIsports-ui-repository
ode_modulesexecaindex.js:231:11
npm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm ERR!     at async Promise.all (index 0)

npm ERR! A complete log of this run can be found in: C:UserssportsAppDataLocal
pm-cache\_logs2024-03-13T19_45_48_979Z-debug-0.log

I am new to npm. I am trying to learn npm install. I used the below package.json and did npm install I am getting the below error. I checked different versions of antd but still no luck. npm view [email protected] dependencies can you let me know how to fix it

{
  "name": "SPORTS-react-boilerplate",
  "version": "1.0.0",
  "description": "A h",
  "engines": {
    "npm": ">=5",
    "node": ">=8.15.1"
  },
  "author": "Srini K & Team",
  "license": "MIT",
  "scripts": {
    "build": "npm run build:dev",
    "build:dev": "webpack --config internals/webpack/webpack.dev.babel.js --color -p --progress --hide-modules --display-optimization-bailout",
    "build:ple": "webpack --config internals/webpack/webpack.ple.babel.js --color -p --progress --hide-modules --display-optimization-bailout",
    "build:prod": "webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress --hide-modules --display-optimization-bailout",
    "start": "webpack-dev-server --config internals/webpack/webpack.local.babel.js  --disable-host-check",
    "dev": "webpack-dev-server --config internals/webpack/webpack.dev.babel.js  --disable-host-check",
    "ple": "webpack-dev-server --config internals/webpack/webpack.ple.babel.js  --disable-host-check",
    "prod": "webpack-dev-server --config internals/webpack/webpack.prod.babel.js  --disable-host-check",
    "lint": "npm run lint:js && npm run lint:css",
    "lint:css": "stylelint app/**/*.js",
    "lint:eslint": "eslint --ignore-path .gitignore",
    "lint:eslint:fix": "eslint --ignore-path .gitignore --fix",
    "lint:js": "npm run lint:eslint -- . ",
    "lint:staged": "lint-staged",
    "prettify": "prettier --write"
  },
  "browserslist": [
    "last 2 versions",
    "> 1%",
    "IE 10"
  ],
  "lint-staged": {
    "*.js": [
      "npm run lint:eslint:fix",
      "git add --force"
    ],
    "*.json": [
      "prettier --write",
      "git add --force"
    ]
  },
  "resolutions": {
    "babel-core": "7.0.0-bridge.0"
  },
  "dependencies": {
    "@adobe/cq-react-editable-components": "~1.0.3",
    "@adobe/cq-spa-component-mapping": "~1.0.3",
    "@adobe/cq-spa-page-model-manager": "~1.0.4",
    "@ant-design/compatible": "^1.0.8",
    "@ant-design/icons": "^4.3.0",
    "@babel/polyfill": "7.4.3",
    "@animal/accordions": "^1.2.1",
    "@animal/buttons": "^1.5.0",
    "@animal/inputs": "^1.7.1",
    "@animal/lines": "^1.0.2",
    "@animal/loaders": "^1.0.5",
    "@animal/modals": "^1.3.0",
    "@animal/notifications": "^1.3.0",
    "@animal/pagination": "^1.2.1",
    "@animal/selects": "^1.4.1",
    "@animal/tables": "^1.0.3",
    "@animal/tabs": "^1.0.5",
    "@animal/theme": "^1.0.2",
    "@SPORTSrf/react-button": "^1.4.8",
    "@SPORTSrf/react-forms": "^1.3.12",
    "@SPORTSrf/react-grid": "^1.3.10",
    "@SPORTSrf/react-header-block": "^1.0.3",
    "@SPORTSrf/react-icon": "^1.0.3",
    "@SPORTSrf/react-table": "^1.4.7",
    "@SPORTSrf/react-theme": "^1.3.9",
    "antd": "^4.15.6",
    "axios": "^0.21.1",
    "bootstrap": "^4.5.3",
    "bootstrap-switch-button-react": "^1.2.0",
    "chalk": "^2.4.2",
    "chokidar": "^3.5.0",
    "compression": "1.7.4",
    "connected-react-router": "6.4.0",
    "cross-env": "5.2.0",
    "date-fns": "^2.22.1",
    "export-from-json": "^1.3.4",
    "express": "4.16.4",
    "file-saver": "^2.0.5",
    "focus-trap-react": "^8.3.2",
    "fontfaceobserver": "2.1.0",
    "highcharts": "^9.2.2",
    "highcharts-react-official": "^3.1.0",
    "history": "4.9.0",
    "hoist-non-react-statics": "3.3.0",
    "immer": "3.0.0",
    "invariant": "2.2.4",
    "ip": "1.1.5",
    "is-core-module": "^2.2.0",
    "lodash": "^4.17.21",
    "minimist": "^1.2.5",
    "multiselect-react-dropdown": "^1.6.2",
    "optimize-css-assets-webpack-plugin": "^5.0.4",
    "prop-types": "15.7.2",
    "react": "16.8.6",
    "react-beautiful-dnd": "^13.1.0",
    "react-bootstrap": "^1.4.0",
    "react-contenteditable": ">=3.2.0",
    "react-cron-generator": "^1.2.12",
    "react-csv": "^2.0.3",
    "react-datepicker": "^3.8.0",
    "react-dom": "16.8.6",
    "react-dom-factories": "^1.0.2",
    "react-json-to-csv": "^1.0.4",
    "react-querybuilder": "^3.12.1",
    "react-redux": "7.0.2",
    "react-responsive": "^8.1.0",
    "react-router-dom": "^5.2.0",
    "react-select": "^4.3.1",
    "redux": "4.0.1",
    "redux-saga": "1.0.2",
    "reselect": "4.0.0",
    "sanitize.css": "8.0.0",
    "styled-components": "^4.4.1",
    "ua-parser-js": "^0.7.24",
    "uglifyjs-webpack-plugin": "^2.2.0",
    "url-regex": "^5.0.0",
    "xlsx": "^0.16.9"
  },
  "devDependencies": {
    "@babel/cli": "7.4.3",
    "@babel/core": "7.4.3",
    "@babel/plugin-proposal-class-properties": "7.4.0",
    "@babel/plugin-proposal-optional-chaining": "^7.12.17",
    "@babel/plugin-syntax-dynamic-import": "7.2.0",
    "@babel/plugin-transform-modules-commonjs": "7.4.3",
    "@babel/plugin-transform-react-constant-elements": "7.2.0",
    "@babel/plugin-transform-react-inline-elements": "7.2.0",
    "@babel/preset-env": "7.4.3",
    "@babel/preset-react": "7.0.0",
    "@babel/register": "7.4.0",
    "@SPORTSrf/react-accordion": "^1.8.0",
    "@webpack-cli/serve": "^1.1.0",
    "add-asset-html-webpack-plugin": "3.1.3",
    "babel-core": "7.0.0-bridge.0",
    "babel-eslint": "10.0.1",
    "babel-loader": "8.0.5",
    "babel-plugin-dynamic-import-node": "2.2.0",
    "babel-plugin-lodash": "3.3.4",
    "babel-plugin-react-intl": "3.0.1",
    "babel-plugin-styled-components": "1.10.0",
    "babel-plugin-transform-react-remove-prop-types": "0.4.24",
    "circular-dependency-plugin": "5.0.2",
    "compare-versions": "3.4.0",
    "compression-webpack-plugin": "^2.0.0",
    "coveralls": "3.0.3",
    "css-loader": "2.1.1",
    "eslint": "5.16.0",
    "eslint-config-airbnb": "17.1.0",
    "eslint-config-airbnb-base": "13.1.0",
    "eslint-config-prettier": "4.1.0",
    "eslint-import-resolver-webpack": "0.11.1",
    "eslint-plugin-import": "2.17.2",
    "eslint-plugin-jsx-a11y": "6.2.1",
    "eslint-plugin-prettier": "3.0.1",
    "eslint-plugin-react": "7.12.4",
    "eslint-plugin-react-hooks": "1.6.0",
    "eslint-plugin-redux-saga": "1.0.0",
    "file-loader": "^3.0.1",
    "html-loader": "0.5.5",
    "html-webpack-plugin": "3.2.0",
    "image-webpack-loader": "^4.6.0",
    "imports-loader": "0.8.0",
    "jest-cli": "24.7.1",
    "jest-dom": "3.1.3",
    "jest-styled-components": "6.3.1",
    "lint-staged": "8.1.5",
    "null-loader": "0.1.1",
    "offline-plugin": "5.0.6",
    "pre-commit": "1.2.2",
    "prettier": "1.17.0",
    "react-app-polyfill": "0.2.2",
    "react-test-renderer": "16.8.6",
    "react-testing-library": "6.1.2",
    "rimraf": "2.6.3",
    "shelljs": "^0.8.3",
    "style-loader": "0.23.1",
    "stylelint": "10.0.1",
    "stylelint-config-recommended": "2.2.0",
    "stylelint-config-styled-components": "0.1.1",
    "stylelint-processor-styled-components": "1.6.0",
    "svg-url-loader": "2.3.2",
    "terser-webpack-plugin": "1.2.3",
    "url-loader": "^1.1.2",
    "webpack": "4.30.0",
    "webpack-cli": "^3.3.12",
    "webpack-dev-middleware": "3.6.2",
    "webpack-dev-server": "^3.11.0",
    "webpack-hot-middleware": "2.24.3",
    "webpack-pwa-manifest": "4.0.0",
    "whatwg-fetch": "3.0.0"
  }
}

npm install npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/react npm ERR! react@"16.8.6" from the root project npm ERR! peer react@">=16.0.0" from @ant-design/[email protected] npm ERR! node_modules/@ant-design/compatible npm ERR! @ant-design/compatible@"^1.0.8" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@">=16.9.0" from [email protected] npm ERR! node_modules/antd npm ERR! antd@"^4.15.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! npm ERR! For a full report see: npm ERR! C:UserssportsAppDataLocal pm-cache_logs2024-03-13T18_30_03_412Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: C:UserssportsAppDataLocal pm-cache_logs2024-03-13T18_30_03_412Z-debug-0.log

问题回答

我曾经有过这个问题,我不得不利用这个问题。

npm install --force

You can read more about it here





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签