TS2724:'vue”没有名为'JSXComponent”的导出成员。您指的是'组件”吗?
P粉278379495
P粉278379495 2023-09-02 11:22:21
0
1
536

我正在尝试启动 Vue 3 + Vuetify 项目,但正在运行 yarn build 时遇到此错误:</p> <pre class="brush:php;toolbar:false;">>纱线构建 node_modules/vuetify/lib/components/index.d.mts:2:99 - 错误 TS2724: ''vue''没有名为“JSXComponent”的导出成员。您指的是“组件”吗? 2 导入 { Ref、DeepReadonly、ComponentPropsOptions、ExtractPropTypes、VNodeChild、VNode、PropType、JSXComponent、ComponentInternalInstance、CompulatedRef、Component、EffectScope、nextTick、WritableCompulatedRef、CSSProperties、Prop、Co mponentPublicInstance、Inj​​ectionKey、UnwrapRef } 来自“vue”; ~~~~~~~~~~~~ node_modules/vuetify/lib/index.d.mts:2:29 - 错误 TS2724:“vue”没有名为“JSXComponent”的导出成员。您指的是“组件”吗? 2 从 'vue' 导入 { Ref, DeepReadonly, JSXComponent, PropType, CSSProperties, App }; ~~~~~~~~~~~~ node_modules/vuetify/lib/labs/components.d.mts:2:69 - 错误 TS2724: ''vue''没有名为“JSXComponent”的导出成员。您指的是“组件”吗? 2 从 'vue' 导入 { ComponentPropsOptions, ExtractPropTypes, Ref, EffectScope, JSXComponent, PropType, UnwrapRef, CSSProperties, nextTick, VNode }; ~~~~~~~~~~~~ 在 3 个文件中发现 3 个错误。 错误文件 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>这是我的<code>package.json</code>:</p>

{
  “名称”:“前端”,
  “版本”:“0.0.0”,
  “私人”:真实,
  “脚本”:{
    “dev”:“vite”,
    “构建”:“vue-tsc --noEmit &&” vite 构建”,
    "preview": "vite预览",
    “lint”:“eslint”。 --fix --ignore-path .gitignore”
  },
  “依赖关系”:{
    “@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”
  },
  “开发依赖项”:{
    “@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”,
    “打字稿”:“^5.0.0”,
    “vite”:“^4.3.8”,
    "vite-plugin-vuetify": "^1.0.0",
    “vue-tsc”:“^1.2.0”
  }
}</pre></p>            
P粉278379495
P粉278379495

全部回复(1)
P粉924915787

我通过更新“build”脚本以删除 vue-tsc --noEmit 命令解决了这个问题。

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!