Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

613
Visualizações
npm install error while use webpack, Could not resolve dependency

The error as follows:

> npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! Found: webpack@3.12.0
npm ERR! node_modules/webpack
npm ERR!   dev webpack@"^3.5.6" from the root project
npm ERR!   peer webpack@"2 || 3 || 4" from _babel-loader@7.1.5@babel-loader@7.1.5
npm ERR!   node_modules/_babel-loader@7.1.5@babel-loader
npm ERR!   5 more (_html-webpack-plugin@2.30.1@html-webpack-plugin, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^2.0.0" from _strip-pragma-loader@1.0.0@strip-pragma-loader@1.0.0
npm ERR! node_modules/_strip-pragma-loader@1.0.0@strip-pragma-loader
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/agou-ops/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/agou-ops/.npm/_logs/2021-04-12T02_49_11_062Z-debug.log

debug.log file content: enter image description here

packge version and system

  • npm: 7.6.3
  • webpack: 3.12.0
  • system: Ubuntu 20.04

How should I fix it?

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

npm@7 has stricter dependency resolution than previous versions. If you can update the version of webpack in your root project, that may resolve it. An alternative easy quick thing to try is npm install --legacy-peer-deps.

over 4 years ago · Santiago Trujillo Relatório

0

I met the same problem.

try to run the command with --force , if you don't use the related package.

e.g.

npm install --verbose --force
over 4 years ago · Santiago Trujillo Relatório

0

Downgrade to a lower npm version with, for example,

npm install npm@6
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda