0

В общем имеем следующую проблему на Linux Mint 20:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! Found: [email protected]
npm ERR! node_modules/webpack
npm ERR!   dev webpack@"^5.4.0" from the root project
npm ERR!   peer webpack@"^4.0.0 || ^5.0.0" from [email protected]
npm ERR!   node_modules/html-webpack-plugin
npm ERR!     dev html-webpack-plugin@"^4.5.0" from the root project
npm ERR!     peer html-webpack-plugin@"^3.0.4 || ^4.0.0-0" from [email protected]
npm ERR!     node_modules/add-asset-html-webpack-plugin
npm ERR!       dev add-asset-html-webpack-plugin@"^3.1.3" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^4.0.0" from [email protected]
npm ERR! node_modules/webpack-dev-server/node_modules/webpack-dev-middleware
npm ERR!   webpack-dev-middleware@"^3.7.2" from [email protected]
npm ERR!   node_modules/webpack-dev-server
npm ERR!     dev webpack-dev-server@"^3.11.0" 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/***/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/***/.npm/_logs/2020-11-10T06_12_57_304Z-debug.log

Данные манипуляции уже проделаны:

rimraf node_modules/
rimraf package-lock.json
npm cache clean
npm i
npm i --force

Также был переустановлен webpack, то есть, установлен глобально и нет.

$> node -v      
v15.1.0

$> npm -v
7.0.8

Пример package.json:

{
  "name": "test",
  "version": "1.0.0",
  "description": "Тест",
  "private": true,
  "author": "***",
  "license": "ISC",
  "main": "index.js",
  "directories": {
    "doc": "doc"
  },
  "keywords": [],
  "browserslist": [
    "defaults",
    "Firefox 29",
    "safari 5"
  ],
  "dependencies": {
    "@babel/runtime": "^7.12.5",
    "@mdi/font": "^5.8.55",
    "babel-preset-es2017": "^6.24.1",
    "webix": "^8.0.1"
  },
  "devDependencies": {
    "@babel/core": "^7.12.3",
    "@babel/plugin-proposal-class-properties": "^7.12.1",
    "@babel/plugin-syntax-class-properties": "^7.12.1",
    "@babel/plugin-transform-runtime": "^7.12.1",
    "@babel/preset-env": "^7.12.1",
    "@babel/runtime": "^7.12.5",
    "add-asset-html-webpack-plugin": "^3.1.3",
    "babel": "^6.23.0",
    "babel-loader": "^8.1.0",
    "babel-plugin-transform-runtime": "^6.23.0",
    "babel-polyfill": "^6.26.0",
    "babel-preset-es2015": "^6.0.15",
    "babel-preset-stage-0": "^6.24.1",
    "clean-webpack-plugin": "^3.0.0",
    "cross-env": "^7.0.2",
    "css-loader": "^5.0.1",
    "extract-text-webpack-plugin": "^3.0.2",
    "file-loader": "^6.2.0",
    "html-webpack-plugin": "^4.5.0",
    "json-loader": "^0.5.7",
    "mini-css-extract-plugin": "^1.3.0",
    "moment-locales-webpack-plugin": "^1.2.0",
    "node-sass": "^5.0.0",
    "optimize-css-assets-webpack-plugin": "^5.0.4",
    "raw-loader": "^4.0.2",
    "sass": "^1.29.0",
    "sass-loader": "^10.0.5",
    "style-loader": "^2.0.0",
    "twig-html-loader": "^0.1.8",
    "url-loader": "^4.1.1",
    "webpack": "^5.4.0",
    "webpack-cli": "^4.2.0",
    "webpack-dev-server": "^3.11.0",
    "webpack-hot-middleware": "^2.25.0",
    "webpack-shell-plugin": "^0.5.0",
    "webpackbar": "^4.0.0"
  },
  "scripts": {
    "testDev": "cross-env NODE_ENV=development webpack --mode development --config webpack.test.config.js --progress",
    "testDevW": "cross-env NODE_ENV=development webpack --mode development --config webpack.test.config.js --watch",
    "testPro": "cross-env NODE_ENV=production webpack --mode production --config webpack.test.config.js"
  }
}

1 ответ 1

0

Всё установил следующей командой:

npm i --legacy-peer-deps

Ваш ответ

Нажимая «Отправить ответ», вы соглашаетесь с условиями пользования и подтверждаете, что прочитали политику конфиденциальности.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.