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

install taro-ui error #1793

Open
cqzhen opened this issue May 17, 2024 · 12 comments
Open

install taro-ui error #1793

cqzhen opened this issue May 17, 2024 · 12 comments

Comments

@cqzhen
Copy link

cqzhen commented May 17, 2024

微信图片_20240517122105

Copy link

taro-ui-bot bot commented May 17, 2024

欢迎提交 Issue~

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

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

Good luck and happy coding~

@cqzhen cqzhen changed the title install taro error install taro-ui error May 17, 2024
@robinv8
Copy link
Member

robinv8 commented May 19, 2024

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

@cqzhen
Copy link
Author

cqzhen commented May 19, 2024

麻烦提供下具体的安装步骤或者可复现的 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 这个版本组合可以用

@robinv8
Copy link
Member

robinv8 commented May 20, 2024

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

@gywghhb
Copy link

gywghhb commented May 27, 2024

可以把你的 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,且都无法安装)。

@liamyu
Copy link

liamyu commented May 28, 2024

'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
Copy link

liamyu commented May 28, 2024

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

@djx0716
Copy link

djx0716 commented Jun 12, 2024

我遇到了用样的问题。今天使用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

@zhangyaoweb
Copy link

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

@supermanyqq
Copy link

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

@xiaohaoo
Copy link

这个问题没人解决吗?

@JohnGao818
Copy link

这么久过去了,还没修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants