taro-ui icon indicating copy to clipboard operation
taro-ui copied to clipboard

install taro-ui error

Open cqzhen opened this issue 1 year ago • 14 comments

微信图片_20240517122105

cqzhen avatar May 17 '24 04:05 cqzhen

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

taro-ui-bot[bot] avatar May 17 '24 04:05 taro-ui-bot[bot]

麻烦提供下具体的安装步骤或者可复现的 demo

robinv8 avatar May 19 '24 13:05 robinv8

麻烦提供下具体的安装步骤或者可复现的 demo

Node 18.18.0 Taro (3.6.29 | 3.6.18) Taro-ui (3.3.0 | 3.0.0) -> error Node 16.18.0 Taro (3.6.29 | 3.6.18) Taro-ui (3.3.0 | 3.0.0) -> error

不过我现在安装的 Taro-ui 3.0.0-alpha.10 可以用了,版本组合如下: Node 16.18.0 Taro 3.4 Taro-ui 3.0.0-alpha.10 这个版本组合可以用

cqzhen avatar May 19 '24 13:05 cqzhen

可以把你的 demo git 地址贴出来,我试试,方便定位问题

robinv8 avatar May 20 '24 01:05 robinv8

可以把你的 demo git 地址贴出来,我试试,方便定位问题

我觉得这个不用麻烦他/她发git地址。直接新建一个项目taro init xxApp,无论是用默认模版后再npm install taro-ui还是在初始化过程阶段选择taro-ui模版,在安装的时候都会出这个错误。

由于某种原因,3.1.0版本以后的taro-ui的react版本和taro项目本身的react版本起了冲突(通过多次安装不同版本的taro-ui得出的结论)。而3.0.0@alpha.[各个版本]都可以安装。

我还没有深入去看其中的源码,所以目前还不能得出有用的结论。但我最好奇的还是为什么这个问题会在taro init给的官方taro-ui模版中出现(无论是Gitee还是GitHub给的最新taro-ui版本都是3.2.1,且都无法安装)。

gywghhb avatar May 27 '24 19:05 gywghhb

'Log files: /Users/liam/.npm/_logs/2024-05-28T03_10_45_782Z-debug-0.log

npm resolution error report

While resolving: [email protected] Found: [email protected] node_modules/react react@"^18.0.0" from the root project peer react@">=16.13.0" from [email protected] node_modules/taro-ui taro-ui@"" from the root project peer react@"^18.3.1" from [email protected] node_modules/react-dom react-dom@"^18.0.0" from the root project peer react-dom@">=16.13.0" from [email protected] node_modules/taro-ui taro-ui@"" from the root project

Could not resolve dependency: peer react@"18.2.0" from [email protected] node_modules/react-native peer react-native@">=0.62.0" from [email protected] node_modules/taro-ui taro-ui@"*" 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.

相同的问题

liamyu avatar May 28 '24 03:05 liamyu

试了3.2.0、3.1.0都不行,3.1.0-beta.2可以

liamyu avatar May 28 '24 05:05 liamyu

我遇到了用样的问题。今天使用taro-cli拉取taro-ui模版之后,进行npm install遇到了报错。

npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error npm error While resolving: [email protected] npm error Found: [email protected] npm error node_modules/react npm error react@"^18.0.0" from the root project npm error peer react@">=16.13.0" from [email protected] npm error node_modules/taro-ui npm error taro-ui@"3.3.0" from the root project npm error 1 more (react-dom) npm error npm error Could not resolve dependency: npm error peer react@"18.2.0" from [email protected] npm error node_modules/react-native npm error peer react-native@">=0.62.0" from [email protected] npm error node_modules/taro-ui npm error taro-ui@"3.3.0" from the root project npm error npm error Fix the upstream dependency conflict, or retry npm error this command with --force or --legacy-peer-deps npm error to accept an incorrect (and potentially broken) dependency resolution.

taro版本: v3.6.31 node版本:v22.3

djx0716 avatar Jun 12 '24 09:06 djx0716

遇到同样的问题 文档自己写的安装步骤都有问题

zhangyaoweb avatar Jul 16 '24 08:07 zhangyaoweb

遇到同样的问题,有解决办法了吗

supermanyqq avatar Aug 06 '24 04:08 supermanyqq

这个问题没人解决吗?

xiaohaoo avatar Aug 11 '24 10:08 xiaohaoo

这么久过去了,还没修复

JohnGao818 avatar Aug 11 '24 16:08 JohnGao818

都2025年了,这个问题还没解决嘛

heyuuuu avatar Feb 09 '25 18:02 heyuuuu

这个bug 就是部分依赖没有锁定版本向上兼容,部分又是锁定的 taro-ui 3.3.0解决办法就是

{
"dependencies": {
"react": "18.2.0",
    "react-dom": "18.2.0",
},
  "devDependencies": {
    "react-native": "0.73.1",
}
}

安装完成后在执行npm install taro-ui

have a nice day (๑•̀ㅂ•́)و✧

Aomd avatar Feb 24 '25 11:02 Aomd