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

@antmjs/vantui dependencies 里包含vue 导致npm安装了vue的包,从而导致ts类型检测不通过 #526

Closed
1 of 7 tasks
eleven-ng opened this issue Jun 14, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@eleven-ng
Copy link

这个 Issue 涉及以下平台:

  • 微信小程序
  • 支付宝小程序
  • 百度小程序
  • 头条小程序
  • 快手小程序
  • QQ 轻应用
  • Web 平台(H5)

BUG 描述
@antmjs/vantui dependencies 里包含vue 导致npm安装了vue的包,从而导致ts类型检测不通过出现如下错误

“Image”不能用作 JSX 组件。
其返回类型 "ReactElement<any, any> | null" 不是有效的 JSX 元素。

“View”不能用作 JSX 组件。
其元素类型 "ReactElement<any, any> | Component<ViewProps, any, any> | null" 不是有效的 JSX 元素。
不能将类型“ReactElement<any, any>”分配给类型“Element | ElementClass | null”。

复现步骤
npm 安装@antmjs/vantui 后出现
期望结果
React 框架下不应该安装Vue 。
实际结果
安装@antmjs/vantui 后 node_modules里出现了Vue包
截图
WeChat897cf3a067ead7bd90451c95916107d1

环境
node:16.19.1
npm:8.19.3
附加信息

@zuolung zuolung added the bug Something isn't working label Jun 14, 2023
zuolung pushed a commit that referenced this issue Jun 14, 2023
@zuolung zuolung closed this as completed Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants