uni-app使用typeScript打包报错,这个该如何解决?
ERROR in /data/spug/spug_api/repos/9_55_20210429100409/src/App.vue
7:3 No overload matches this call.
The last overload gave the following error.
Argument of type '{ mpType: string; onLaunch(): void; onShow(): void; methods: { updateApplet(): void; }; onHide(): void; }' is not assignable to parameter of type 'ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<...>>'.
Object literal may only specify known properties, and 'mpType' does not exist in type 'ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<...>>'.
5 |
6 | export default Vue.extend({
7 | mpType: 'app',
| ^
8 | onLaunch() {
9 | this.updateApplet()
10 | },
ERROR in /data/spug/spug_api/repos/9_55_20210429100409/src/App.vue
9:10 Property 'updateApplet' does not exist on type 'CombinedVueInstance<Vue, unknown, unknown, unknown, Readonly<Record<never, any>>>'.
7 | mpType: 'app',
8 | onLaunch() {
9 | this.updateApplet()
| ^
10 | },
11 | onShow() {
12 | },
No lint errors found
Version: typescript 3.9.9, tslint 5.20.1
2 个回复
起風了
uni-app打包H5打包失败怎么办?
[HBuilder] 09:43:19.372 #
[HBuilder] 09:43:19.374 # Fatal error in , line 0
[HBuilder] 09:43:19.381 # API fatal error handler returned after process out of memory
[HBuilder] 09:43:19.382 #
m***@163.com
uni-app使用typeScript打包报错,这个该如何解决?
ERROR in /data/spug/spug_api/repos/9_55_20210429100409/src/App.vue
7:3 No overload matches this call.
The last overload gave the following error.
Argument of type '{ mpType: string; onLaunch(): void; onShow(): void; methods: { updateApplet(): void; }; onHide(): void; }' is not assignable to parameter of type 'ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<...>>'.
Object literal may only specify known properties, and 'mpType' does not exist in type 'ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<...>>'.
5 |
6 | export default Vue.extend({
3***@qq.com
同问,请问解决了吗
2022-08-11 10:27