只要项目里加了video组件,就会报下方错误
报错内容如下:
11:01:04.885 正在差量编译...
11:01:06.721 [tsl] ERROR at uni_modules\uni-upgrade-center-app\utils\call-check-version.ts:94
11:01:06.721 TS2558:Expected 0 type arguments, but got 1.
11:01:06.721 [tsl] ERROR at uni_modules\uni-upgrade-center-app\utils\call-check-version.ts:99
11:01:06.721 TS2304:Cannot find name 'UniCloudError'.
11:01:06.721 [tsl] ERROR at uni_modules\uni-upgrade-center-app\utils\call-check-version.ts:105
11:01:06.721 TS18046:'e' is of type 'unknown'.
11:01:06.721 [tsl] ERROR at uni_modules\uni-upgrade-center-app\utils\check-update.ts:229
11:01:06.722 TS1005:'}' expected.
11:01:06.722 [tsl] ERROR at uni_modules\uni-upgrade-center-app\utils\check-update.ts:4
11:01:06.722 TS2307:Cannot find module '@/uni_modules/uts-openSchema' or its corresponding type declarations.
11:01:06.722 [tsl] ERROR at uni_modules\uni-upgrade-center-app\utils\check-update.ts:10
11:01:06.722 TS2355:A function whose declared type is neither 'void' nor 'any' must return a value.
11:01:06.722 [tsl] ERROR at uni_modules\uni-upgrade-center-app\utils\check-update.ts:81
11:01:06.722 TS2339:Property 'openDialogPage' does not exist on type 'Uni'.
11:01:06.722 [tsl] ERROR at uni_modules\uni-upgrade-center-app\utils\check-update.ts:84
11:01:06.722 TS7006:Parameter 'err' implicitly has an 'any' type.
11:01:06.722 [tsl] ERROR at uni_modules\uni-upgrade-center-app\utils\check-update.ts:121
11:01:06.722 TS2451:Cannot redeclare block-scoped variable 'confirmText'.
11:01:06.722 [tsl] ERROR at uni_modules\uni-upgrade-center-app\utils\check-update.ts:124
11:01:06.722 TS2451:Cannot redeclare block-scoped variable 'confirmText'.
11:01:06.722 [tsl] ERROR at uni_modules\uni-upgrade-center-app\utils\check-update.ts:217
11:01:06.722 TS2339:Property 'errMsg' does not exist on type 'InstallApkFail'.
1 个回复
Ask小助手 - Ask社区AI助手
根据您描述的TypeScript编译错误(TS2558、TS2304等),这通常是由于HBuilderX版本与插件兼容性或项目配置问题导致。重点排查以下两点:
HBuilderX版本问题
当前uni-app正式版为4.85(alpha 4.86),而
uni-upgrade-center0.9.7可能存在TS类型定义不兼容。建议:manifest.json中transpiler是否设置为babel(若用TS需确保配置正确)插件冲突可能性
sunny-video组件(uts插件)与uni-upgrade-center可能存在命名空间冲突。uni_modules目录,检查路径是否正确(错误中@/uni_modules/uts-openSchema路径异常)请补充说明:具体运行平台(App/小程序/鸿蒙)及HBuilderX版本号,以便进一步定位问题。
要回复问题请先登录或注册
公告
更多>相关问题