TS2724: 'vue' tidak mempunyai ahli yang dieksport bernama 'JSXComponent'. Adakah anda maksudkan "komponen"?
<p>我正在尝试启动 Vue 3 + Vuetify 项目,但在运行 <kod>bangunan benang</kod> 时遇到此错误:</p>
<pre class="brush:php;toolbar:false;">>bangunan benang
node_modules/vuetify/lib/components/index.d.mts:2:99 - ralat TS2724: '"vue"' tidak mempunyai ahli yang dieksport bernama 'JSXComponent'. Adakah anda maksudkan 'Component'?
2 import { Ref, DeepReadonly, ComponentPropsOptions, ExtractPropTypes, VNodeChild, VNode, PropType, JSXComponent, ComponentInternalInstance, ComputedRef, Component, EffectScope, nextTick, WritableComputedRef, CSSProperties, Prop, Co
mponentPublicInstance, InjectionKey, UnwrapRef } daripada 'vue';
~~~~~~~~~~~~
node_modules/vuetify/lib/index.d.mts:2:29 - ralat TS2724: '"vue"' tidak mempunyai ahli yang dieksport bernama 'JSXComponent'. Adakah anda maksudkan 'Component'?
2 import { Ref, DeepReadonly, JSXComponent, PropType, CSSProperties, App } daripada 'vue';
~~~~~~~~~~~~
node_modules/vuetify/lib/labs/components.d.mts:2:69 - ralat TS2724: '"vue"' tidak mempunyai ahli yang dieksport bernama 'JSXComponent'. Adakah anda maksudkan 'Component'?
2 import { ComponentPropsOptions, ExtractPropTypes, Ref, EffectScope, JSXComponent, PropType, UnwrapRef, CSSProperties, nextTick, VNode } daripada 'vue';
~~~~~~~~~~~~
Menjumpai 3 ralat dalam 3 fail.
Fail Ralat
1 node_modules/vuetify/lib/components/index.d.mts:2
1 node_modules/vuetify/lib/index.d.mts:2
1 node_modules/vuetify/lib/labs/components.d.mts:2</pre>
<p>这是我的<kod>pakej.json</code>:</p>
<pre class="brush:php;toolbar:false;">{
"nama": "depan",
"versi": "0.0.0",
"peribadi": benar,
"skrip": {
"dev": "undang",
"bina": "vue-tsc --noEmit && vite build",
"pratonton": "pratonton jemputan",
"lint": "eslint . --fix --ignore-path .gitignore"
},
"kebergantungan": {
"@mdi/font": "7.0.96",
"core-js": "^3.29.0",
"pinia": "^2.0.0",
"roboto-fontface": "*",
"vue": "^3.3.4",
"vue-router": "^4.0.0",
"vuetify": "^3.0.0",
"webfontloader": "^1.0.0"
},
"devDependencies": {
"@babel/types": "^7.21.4",
"@types/node": "^18.15.0",
"@types/webfontloader": "^1.6.35",
"@vitejs/plugin-vue": "^3.0.3",
"@vue/eslint-config-typescript": "^11.0.0",
"eslint": "^8.37.0",
"eslint-plugin-vue": "^9.3.0",
"sass": "^1.60.0",
"skrip taip": "^5.0.0",
"undangan": "^4.3.8",
"vite-plugin-vuetify": "^1.0.0",
"vue-tsc": "^1.2.0"
}
}</pre></p>