【发布时间】:2023-02-22 05:40:02
【问题描述】:
当我想在 npm 下安装一些东西时,我得到一个错误。我尝试了很多方法来修复它,但都失败了。这是错误
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: @nomiclabs/hardhat-ethers@0.3.0-beta.13
npm ERR! node_modules/@nomiclabs/hardhat-ethers
npm ERR! dev @nomiclabs/hardhat-ethers@"npm:hardhat-deploy-ethers" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev @nomiclabs/hardhat-waffle@"^2.0.3" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @nomiclabs/hardhat-ethers@2.1.1
npm ERR! node_modules/@nomiclabs/hardhat-ethers
npm ERR! peer @nomiclabs/hardhat-ethers@"^2.0.0" from @nomiclabs/hardhat-waffle@2.0.3
npm ERR! node_modules/@nomiclabs/hardhat-waffle
npm ERR! dev @nomiclabs/hardhat-waffle@"^2.0.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 C:\Users\Mazhar\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Mazhar\AppData\Local\npm-cache\_logs\2022-09-11T23_40_30_606Z-debug-0.log
PS C:\Users\Mazhar\Documents\Alchemy-weekly\nft-marketplace-scratch>
【问题讨论】:
-
尝试使用
yarn安装 -
纱线工作正常,但我想知道问题是什么
npm包管理器。有没有像windows hardhat 安装问题一样的npm 的windows 问题? -
一定有一些 npm 缓存问题,或者某些包版本可能正在这样做。
-
我使用根文件夹和缓存文件夹卸载节点和 npm。但什么都不会改变。但在 ``` Linux `` 中一切正常。 Windows 有什么问题?
标签: node.js npm npm-install