【发布时间】:2021-06-09 12:33:37
【问题描述】:
看来我不能在使用 Webpack 的项目中使用 @cypress/react。
每次我尝试安装它时,都会收到以下错误消息:
while resolving: min-working-example@1.0.0
Found: webpack@5.24.4
node_modules/webpack
dev webpack@"*" from the root project
peer webpack@">=2" from babel-loader@8.2.2
node_modules/babel-loader
peerOptional babel-loader@"^=8.x" from @cypress/react@4.16.4
node_modules/@cypress/react
dev @cypress/react@"*" from the root project
Could not resolve dependency:
peerOptional webpack@"^=3.x" from @cypress/react@4.16.4
node_modules/@cypress/react
dev @cypress/react@"*" from the root project
Fix the upstream dependency conflict, or retry
this command with --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.
我无法自行解决此问题。
为了重现问题,只需
- 创建amn空目录,执行
npm init npm i --save-dev Webpack cypress @cypress/react
【问题讨论】:
-
你试过 npm 审计吗
-
这是个好主意,但我什至无法安装它。我认为我需要在源代码中对此进行一些跟踪,才能开始进行审计
标签: node.js npm webpack dependencies cypress