直接app真机运行
- 发布:2022-09-21 10:37
- 更新:2022-09-21 10:37
- 阅读:1047
产品分类: HbuilderX
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win10
HBuilderX版本号: 3.6.3
操作步骤:
预期结果:
预期结果,不报语法错误,正常运行
预期结果,不报语法错误,正常运行
实际结果:
[tsl] ERROR at ........\Downloads\2.9.3\HBuilderX.2.9.3.20201014.full\HBuilderX\plugins\uniapp-cli:0
10:32:53.130 TS2468:Cannot find global value 'Promise'.
10:32:53.151 [tsl] ERROR at pages\product\api\detail.ts:43
10:32:53.174 TS2550:Property 'padStart' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2017' or later.
10:32:53.175 [tsl] ERROR at pages\product\api\detail.ts:58
10:32:53.201 TS2552:Cannot find name 'Map'. Did you mean 'map'?
10:32:53.202 [tsl] ERROR at pages\product\transaction\api\index.ts:11
10:32:53.225 TS2583:Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
10:32:53.250 [tsl] ERROR at utils\http.ts:58
10:32:53.286 TS1005:',' expected.
10:32:53.308 [tsl] ERROR at utils\http.ts:58
10:32:53.310 TS1134:Variable declaration expected.
10:32:53.331 [tsl] ERROR at utils\http.ts:48
10:32:53.333 TS2550:Property 'includes' does not exist on type 'string[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2016' or later.
10:32:53.367 [tsl] ERROR at utils\http.ts:87
10:32:53.424 TS2550:Property 'assign' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
10:32:53.425 [tsl] ERROR at utils\http.ts:93
10:32:53.539 TS2585:'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
10:32:53.540 [tsl] ERROR at utils\http.ts:120
10:32:53.560 TS2339:Property 'responseMsg' does not exist on type 'string | AnyObject | ArrayBuffer'.
10:32:53.562 Property 'responseMsg' does not exist on type 'string'.
10:32:53.583 [tsl] ERROR at utils\http.ts:121
10:32:53.585 TS2322:Type 'number' is not assignable to type '"long" | "short"'.
10:32:53.610 [tsl] ERROR at utils\http.ts:132
10:32:53.612 TS2339:Property 'responseCode' does not exist on type 'string | AnyObject | ArrayBuffer'.
10:32:53.633 Property 'responseCode' does not exist on type 'string'.
10:32:53.634 [tsl] ERROR at utils\http.ts:204
10:32:53.663 TS2339:Property 'responseCode' does not exist on type 'string | AnyObject | ArrayBuffer'.
10:32:53.663 Property 'responseCode' does not exist on type 'string'.
10:32:53.683 [tsl] ERROR at utils\http.ts:205
10:32:54.063 TS2339:Property 'responseMsg' does not exist on type 'string | AnyObject | ArrayBuffer'.
10:32:56.288 Property 'responseMsg' does not exist on type 'string'.
10:32:56.403 [tsl] ERROR at utils\http.ts:206
10:32:56.423 TS2322:Type 'number' is not assignable to type '"long" | "short"'.
10:32:56.466 [tsl] ERROR at utils\validate\index.ts:157
10:32:56.485 TS2300:Duplicate identifier 'timeStr'.
10:32:56.486 [tsl] ERROR at utils\validate\index.ts:158
10:32:56.505 TS2300:Duplicate identifier 'timeStr'.
10:32:56.506 [tsl] ERROR at utils\validate\index.ts:155
10:32:56.526 TS1009:Trailing comma not allowed.
10:32:56.598 [tsl] ERROR at utils\validate\index.ts:162
10:32:56.599 TS2345:Argument of type 'number' is not assignable to parameter of type 'string'.
10:32:56.616 [tsl] ERROR at api\public.ts:3
10:32:56.617 TS2304:Cannot find name 'requestData'.
10:32:56.670 [tsl] ERROR at api\public.ts:6
10:32:56.703 TS2304:Cannot find name 'requestData'.
10:32:56.736 [tsl] ERROR at utils\userInfo.ts:16
10:32:56.738 TS2705:An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
10:32:56.762 [tsl] ERROR at utils\userInfo.ts:30
10:32:56.846 TS2705:An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
10:32:56.847 [tsl] ERROR at utils\filter\index.ts:50
10:32:56.879 TS2345:Argument of type 'string' is not assignable to parameter of type 'number'.
10:32:56.880 [tsl] ERROR at utils\filter\index.ts:53
10:32:56.904 TS2367:This condition will always return 'false' since the types 'number' and 'string' have no overlap.
10:32:56.905 [tsl] ERROR at utils\filter\index.ts:83
10:32:56.930 TS2367:This condition will always return 'false' since the types 'string' and 'number' have no overlap.
10:32:56.931 [tsl] ERROR at utils\filter\index.ts:151
10:32:56.949 TS2345:Argument of type 'string' is not assignable to parameter of type 'number'.
10:32:57.008 [tsl] ERROR at utils\filter\index.ts:152
10:32:57.013 TS2339:Property 'getYear' does not exist on type 'Date'.
10:32:57.031 [tsl] ERROR at utils\filter\index.ts:163
10:32:57.033 TS2345:Argument of type 'string' is not assignable to parameter of type 'number'.
10:32:57.090 [tsl] ERROR at utils\filter\index.ts:176
10:32:57.091 TS2322:Type 'number' is not assignable to type 'string'.
10:32:57.172 [tsl] ERROR at utils\filter\index.ts:176
10:32:57.173 TS2542:Index signature in type 'String' only permits reading.
10:32:57.201 [tsl] ERROR at utils\filter\index.ts:179
10:32:57.203 TS2363:The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
10:32:57.221 [tsl] ERROR at utils\filter\index.ts:182
10:32:57.225 TS2367:This condition will always return 'false' since the types 'string' and 'number' have no overlap.
10:32:57.267 [tsl] ERROR at utils\investProdHandler.ts:4
10:32:57.272 TS2314:Generic type 'Array<T>' requires 1 type argument(s).
10:32:57.343 [tsl] ERROR at utils\investProdHandler.ts:7
10:32:57.346 TS1055:Type 'void' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.
10:32:57.366 [tsl] ERROR at utils\investProdHandler.ts:8
10:32:57.372 TS2314:Generic type 'Array<T>' requires 1 type argument(s).
10:32:57.392 [tsl] ERROR at utils\investProdHandler.ts:17
10:32:57.393 TS1055:Type 'void' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.
10:32:57.468 [tsl] ERROR at utils\investProdHandler.ts:82
10:32:57.471 TS2304:Cannot find name 'ProductQueryParams'.
10:32:57.492 [tsl] ERROR at utils\investProdHandler.ts:100
10:32:57.495 TS2362:The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
10:32:57.516 [tsl] ERROR at utils\investProdHandler.ts:100
10:32:57.518 TS2363:The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
10:32:57.536 [tsl] ERROR at utils\ProductHandler.ts:21
10:32:57.562 TS2552:Cannot find name 'Map'. Did you mean 'map'?
10:32:57.603 [tsl] ERROR at utils\ProductHandler.ts:38
10:32:57.606 TS2705:An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
10:32:57.641 [tsl] ERROR at utils\ProductHandler.ts:48
10:32:57.665 TS2705:An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
10:32:57.689 [tsl] ERROR at utils\ProductHandler.ts:93
10:32:57.691 TS2322:Type 'any[]' is not assignable to type 'void'.
10:32:57.713 [tsl] ERROR at utils\ProductHandler.ts:104
10:32:57.735 TS2339:Property 'filter' does not exist on type 'void'.
10:32:57.736 [tsl] ERROR at utils\ProductHandler.ts:110
10:32:57.758 TS2339:Property 'filter' does not exist on type 'void'.
10:32:57.777 [tsl] ERROR at utils\ProductHandler.ts:276
10:32:57.779 TS2362:The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
10:32:57.799 [tsl] ERROR at utils\ProductHandler.ts:276
10:32:57.801 TS2352:Conversion of type 'Date' to type 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
[tsl] ERROR at ........\Downloads\2.9.3\HBuilderX.2.9.3.20201014.full\HBuilderX\plugins\uniapp-cli:0
10:32:53.130 TS2468:Cannot find global value 'Promise'.
10:32:53.151 [tsl] ERROR at pages\product\api\detail.ts:43
10:32:53.174 TS2550:Property 'padStart' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2017' or later.
10:32:53.175 [tsl] ERROR at pages\product\api\detail.ts:58
10:32:53.201 TS2552:Cannot find name 'Map'. Did you mean 'map'?
10:32:53.202 [tsl] ERROR at pages\product\transaction\api\index.ts:11
10:32:53.225 TS2583:Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
10:32:53.250 [tsl] ERROR at utils\http.ts:58
10:32:53.286 TS1005:',' expected.
10:32:53.308 [tsl] ERROR at utils\http.ts:58
10:32:53.310 TS1134:Variable declaration expected.
10:32:53.331 [tsl] ERROR at utils\http.ts:48
10:32:53.333 TS2550:Property 'includes' does not exist on type 'string[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2016' or later.
10:32:53.367 [tsl] ERROR at utils\http.ts:87
10:32:53.424 TS2550:Property 'assign' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
10:32:53.425 [tsl] ERROR at utils\http.ts:93
10:32:53.539 TS2585:'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
10:32:53.540 [tsl] ERROR at utils\http.ts:120
10:32:53.560 TS2339:Property 'responseMsg' does not exist on type 'string | AnyObject | ArrayBuffer'.
10:32:53.562 Property 'responseMsg' does not exist on type 'string'.
10:32:53.583 [tsl] ERROR at utils\http.ts:121
10:32:53.585 TS2322:Type 'number' is not assignable to type '"long" | "short"'.
10:32:53.610 [tsl] ERROR at utils\http.ts:132
10:32:53.612 TS2339:Property 'responseCode' does not exist on type 'string | AnyObject | ArrayBuffer'.
10:32:53.633 Property 'responseCode' does not exist on type 'string'.
10:32:53.634 [tsl] ERROR at utils\http.ts:204
10:32:53.663 TS2339:Property 'responseCode' does not exist on type 'string | AnyObject | ArrayBuffer'.
10:32:53.663 Property 'responseCode' does not exist on type 'string'.
10:32:53.683 [tsl] ERROR at utils\http.ts:205
10:32:54.063 TS2339:Property 'responseMsg' does not exist on type 'string | AnyObject | ArrayBuffer'.
10:32:56.288 Property 'responseMsg' does not exist on type 'string'.
10:32:56.403 [tsl] ERROR at utils\http.ts:206
10:32:56.423 TS2322:Type 'number' is not assignable to type '"long" | "short"'.
10:32:56.466 [tsl] ERROR at utils\validate\index.ts:157
10:32:56.485 TS2300:Duplicate identifier 'timeStr'.
10:32:56.486 [tsl] ERROR at utils\validate\index.ts:158
10:32:56.505 TS2300:Duplicate identifier 'timeStr'.
10:32:56.506 [tsl] ERROR at utils\validate\index.ts:155
10:32:56.526 TS1009:Trailing comma not allowed.
10:32:56.598 [tsl] ERROR at utils\validate\index.ts:162
10:32:56.599 TS2345:Argument of type 'number' is not assignable to parameter of type 'string'.
10:32:56.616 [tsl] ERROR at api\public.ts:3
10:32:56.617 TS2304:Cannot find name 'requestData'.
10:32:56.670 [tsl] ERROR at api\public.ts:6
10:32:56.703 TS2304:Cannot find name 'requestData'.
10:32:56.736 [tsl] ERROR at utils\userInfo.ts:16
10:32:56.738 TS2705:An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
10:32:56.762 [tsl] ERROR at utils\userInfo.ts:30
10:32:56.846 TS2705:An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
10:32:56.847 [tsl] ERROR at utils\filter\index.ts:50
10:32:56.879 TS2345:Argument of type 'string' is not assignable to parameter of type 'number'.
10:32:56.880 [tsl] ERROR at utils\filter\index.ts:53
10:32:56.904 TS2367:This condition will always return 'false' since the types 'number' and 'string' have no overlap.
10:32:56.905 [tsl] ERROR at utils\filter\index.ts:83
10:32:56.930 TS2367:This condition will always return 'false' since the types 'string' and 'number' have no overlap.
10:32:56.931 [tsl] ERROR at utils\filter\index.ts:151
10:32:56.949 TS2345:Argument of type 'string' is not assignable to parameter of type 'number'.
10:32:57.008 [tsl] ERROR at utils\filter\index.ts:152
10:32:57.013 TS2339:Property 'getYear' does not exist on type 'Date'.
10:32:57.031 [tsl] ERROR at utils\filter\index.ts:163
10:32:57.033 TS2345:Argument of type 'string' is not assignable to parameter of type 'number'.
10:32:57.090 [tsl] ERROR at utils\filter\index.ts:176
10:32:57.091 TS2322:Type 'number' is not assignable to type 'string'.
10:32:57.172 [tsl] ERROR at utils\filter\index.ts:176
10:32:57.173 TS2542:Index signature in type 'String' only permits reading.
10:32:57.201 [tsl] ERROR at utils\filter\index.ts:179
10:32:57.203 TS2363:The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
10:32:57.221 [tsl] ERROR at utils\filter\index.ts:182
10:32:57.225 TS2367:This condition will always return 'false' since the types 'string' and 'number' have no overlap.
10:32:57.267 [tsl] ERROR at utils\investProdHandler.ts:4
10:32:57.272 TS2314:Generic type 'Array<T>' requires 1 type argument(s).
10:32:57.343 [tsl] ERROR at utils\investProdHandler.ts:7
10:32:57.346 TS1055:Type 'void' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.
10:32:57.366 [tsl] ERROR at utils\investProdHandler.ts:8
10:32:57.372 TS2314:Generic type 'Array<T>' requires 1 type argument(s).
10:32:57.392 [tsl] ERROR at utils\investProdHandler.ts:17
10:32:57.393 TS1055:Type 'void' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.
10:32:57.468 [tsl] ERROR at utils\investProdHandler.ts:82
10:32:57.471 TS2304:Cannot find name 'ProductQueryParams'.
10:32:57.492 [tsl] ERROR at utils\investProdHandler.ts:100
10:32:57.495 TS2362:The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
10:32:57.516 [tsl] ERROR at utils\investProdHandler.ts:100
10:32:57.518 TS2363:The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
10:32:57.536 [tsl] ERROR at utils\ProductHandler.ts:21
10:32:57.562 TS2552:Cannot find name 'Map'. Did you mean 'map'?
10:32:57.603 [tsl] ERROR at utils\ProductHandler.ts:38
10:32:57.606 TS2705:An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
10:32:57.641 [tsl] ERROR at utils\ProductHandler.ts:48
10:32:57.665 TS2705:An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
10:32:57.689 [tsl] ERROR at utils\ProductHandler.ts:93
10:32:57.691 TS2322:Type 'any[]' is not assignable to type 'void'.
10:32:57.713 [tsl] ERROR at utils\ProductHandler.ts:104
10:32:57.735 TS2339:Property 'filter' does not exist on type 'void'.
10:32:57.736 [tsl] ERROR at utils\ProductHandler.ts:110
10:32:57.758 TS2339:Property 'filter' does not exist on type 'void'.
10:32:57.777 [tsl] ERROR at utils\ProductHandler.ts:276
10:32:57.779 TS2362:The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
10:32:57.799 [tsl] ERROR at utils\ProductHandler.ts:276
10:32:57.801 TS2352:Conversion of type 'Date' to type 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
bug描述:
原本的在293版本上,代码运行没问题,因安全问题,hb升级到363,审计后运行项目,报一堆ts语法错误,在293不存在