慕言
慕言
  • 发布:2022-10-27 15:00
  • 更新:2022-10-28 12:19
  • 阅读:278

cli + ts 项目,运行到 Android 手机报错

分类:uni-app

详细问题描述

通过 HBuilderX 运行到 Android 报错,报错内容如下:

14:34:02.302 ​warn​ ​-​ ​You have enabled the JIT engine which is currently in preview.​  
14:34:02.304 ​warn​ ​-​ ​Preview features are not covered by semver, may introduce breaking changes, and can change at any time.​  
14:34:02.304 ​​  
14:34:02.307 ​info​ ​-​ ​Tailwind CSS is watching for changes...​  
14:34:02.307 ​info​ ​-​ ​https://tailwindcss.com/docs/just-in-time-mode#watch-mode-and-one-off-builds​  
14:34:11.622 No issues found.  
14:34:11.623 [tsl] ERROR at ..\node_modules\vue\types\jsx.d.ts:39  
14:34:11.626   TS1110:Type expected.  
14:34:11.628 [tsl] ERROR at ..\node_modules\vue\types\jsx.d.ts:39  
14:34:11.631   TS1005:';' expected.  
14:34:11.631 [tsl] ERROR at ..\node_modules\vue\types\jsx.d.ts:39  
14:34:11.633   TS1128:Declaration or statement expected.  
14:34:11.635 [tsl] ERROR at ..\node_modules\vue\types\jsx.d.ts:40  
14:34:11.635   TS1128:Declaration or statement expected.  
14:34:11.826 ​​  
14:34:11.827 ​info​ ​-​ ​Tailwind CSS is watching for changes...​  
14:34:11.830 ​info​ ​-​ ​https://tailwindcss.com/docs/just-in-time-mode#watch-mode-and-one-off-builds​  
14:34:12.414 项目 'DEMO' 编译成功。  
14:34:12.417 [tsl] ERROR at ..\node_modules\vue\types\jsx.d.ts:39  
14:34:12.418   TS1110:Type expected.  
14:34:12.420 [tsl] ERROR at ..\node_modules\vue\types\jsx.d.ts:39  
14:34:12.424   TS1005:';' expected.  
14:34:12.424 [tsl] ERROR at ..\node_modules\vue\types\jsx.d.ts:39  
14:34:12.426   TS1128:Declaration or statement expected.  
14:34:12.426 [tsl] ERROR at ..\node_modules\vue\types\jsx.d.ts:40  
14:34:12.430   TS1128:Declaration or statement expected.  
14:34:12.430  ERROR  Build failed with errors.  
14:34:12.446 正在建立手机连接...  
14:34:13.129 手机端调试基座版本号为3.6.4, 版本号相同,跳过基座更新  
14:34:13.498 正在同步手机端程序文件...  
14:34:16.430 同步手机端程序文件完成  
14:34:17.448 正在启动HBuilder调试基座...

[期望] 不存在报错信息

运行环境说明

[IDE版本号] HBuilderX 3.6.4.20220922
[Vue CLI 版本] Vue CLI v4.5.15
[node 版本] node v16.5.0

创建方式

vue create -p dcloudio/uni-preset-vue my-project

其他说明

重新通过 vue create 创建默认的 typescript 项目,然后直接通过 HBuilderX 运行到手机也有这样的错误。

2022-10-27 15:00 负责人:无 分享
已邀请:
DCloud_UNI_WZF

DCloud_UNI_WZF

问题复现,感谢反馈,已加分

DCloud_UNI_WZF

DCloud_UNI_WZF

暂时可将 @dcloudio 相关依赖版本升到 2.0.1-alpha-36820221027001 规避此问题

  • 慕言 (作者)

    目前我通过升级 typescript 依赖版本解决了该问题,把 3.0.0 升级到了 4.x 版本就没此类报错问题了

    2022-10-28 11:11

DCloud_UNI_WZF

DCloud_UNI_WZF

问题已修复

要回复问题请先登录注册