vantui
vantui copied to clipboard
@antmjs/vantui dependencies 里包含vue 导致npm安装了vue的包,从而导致ts类型检测不通过
这个 Issue 涉及以下平台:
- [x] 微信小程序
- [ ] 支付宝小程序
- [ ] 百度小程序
- [ ] 头条小程序
- [ ] 快手小程序
- [ ] 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包
截图
环境 node:16.19.1 npm:8.19.3 附加信息