Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not resolve dependency: npm ERR! peer @tarojs/plugin-platform-alipay@"3.6.6" from taro-ui@3.2.0 npm ERR! node_modules/taro-ui npm ERR! taro-ui@"^3.2.0-beta.2" 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. #14954

Open
CoderChinese opened this issue Dec 11, 2023 · 2 comments
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@CoderChinese
Copy link

相关平台

微信小程序

小程序基础库: 3.2.3
使用框架: React

复现步骤

C:\Users\Cin\Desktop>taro init my
👽 Taro v3.6.20

‼ 获取 taro 全局配置文件失败,不存在全局配置文件:C:\Users\Cin.taro-global-config\index.json

Taro 即将创建一个新项目!
Need help? Go and open issue: https://tls.jd.com/taro-issue-helper

? 请输入项目介绍 my
? 请选择框架 React
? 是否需要使用 TypeScript ? Yes
? 请选择 CSS 预处理器(Sass/Less/Stylus) Sass
? 请选择编译工具 Webpack5
? 请选择包管理工具 npm
? 请选择模板源 Gitee(最快)
√ 拉取远程模板仓库成功!
? 请选择模板 taro-ui(使用 taro-ui 的模板)
√ cd my, 执行 git init
‼ npm ERR! code ERESOLVE
‼ npm ERR!
‼ ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: my@1.0.0
npm ERR! Found: @tarojs/plugin-platform-alipay@3.6.20
npm ERR! node_modules/@tarojs/plugin-platform-alipay
npm ERR! @tarojs/plugin-platform-alipay@"3.6.20" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @tarojs/plugin-platform-alipay@"3.6.6" from taro-ui@3.2.0
npm ERR! node_modules/taro-ui
npm ERR! taro-ui@"^3.1.0-beta.2" 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\cin\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\cin\AppData\Local\npm-cache_logs\2023-12-11T06_49_03_491Z-debug.log
× 安装项目依赖失败,请自行重新安装!
Error: Command failed: npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: my@1.0.0
npm ERR! Found: @tarojs/plugin-platform-alipay@3.6.20
npm ERR! node_modules/@tarojs/plugin-platform-alipay
npm ERR! @tarojs/plugin-platform-alipay@"3.6.20" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @tarojs/plugin-platform-alipay@"3.6.6" from taro-ui@3.2.0
npm ERR! node_modules/taro-ui
npm ERR! taro-ui@"^3.1.0-beta.2" 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\cin\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\cin\AppData\Local\npm-cache_logs\2023-12-11T06_49_03_491Z-debug.log

at ChildProcess.exithandler (node:child_process:326:12)
at ChildProcess.emit (node:events:365:28)
at maybeClose (node:internal/child_process:1067:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) {

killed: false,
code: 1,
signal: null,
cmd: 'npm install'
}
创建项目 my 成功!
请进入项目目录 my 开始工作吧!😝

期望结果

能够正常初始化

实际结果

未能正常初始化

环境信息

 Taro CLI 3.6.20 environment info:
    System:
      OS: Windows 10 10.0.18363
    Binaries:
      Node: 16.0.0 - C:\Program Files\nodejs\node.EXE
      npm: 7.10.0 - C:\Program Files\nodejs\npm.CMD

补充信息

"@tarojs/plugin-platform-weapp": "3.6.20",
"@tarojs/plugin-platform-alipay": "3.6.20",
"@tarojs/plugin-platform-tt": "3.6.20",
"@tarojs/plugin-platform-swan": "3.6.20",
"@tarojs/plugin-platform-jd": "3.6.20",
"@tarojs/plugin-platform-qq": "3.6.20",
"@tarojs/plugin-platform-h5": "3.6.20",
这些插件都变为3.6.6 还是不可以,报的其他依赖问题

@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Dec 11, 2023
@TheKonka
Copy link
Member

taro-ui 的 peerDependencies 问题
@robinv8

@wave2006
Copy link

一样的报错,出现在项目要安装taro-ui的时候,依赖冲突,希望尽快修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
Status: Todo
Development

No branches or pull requests

3 participants