位置: IT常识 - 正文

vue3+vite+typescript出现does not provide an export named ‘xxx‘ 解决方法

编辑:rootadmin
vue3+vite+typescript出现does not provide an export named ‘xxx‘ 解决方法

推荐整理分享vue3+vite+typescript出现does not provide an export named ‘xxx‘ 解决方法,希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!

vue3+vite+typescript出现does not provide an export named ‘xxx‘ 解决方法

vue3+vite+typescript出现does not provide an export named ‘xxx’ 解决方法。

在使用TinyMCE富文本组件时,出现以下错误:The requested module ‘/src/main/ts/components/EditorPropTypes.ts?t=1674647216370’ does not provide an export named ‘IPropTypes’。

对应EditorPropTypes.ts中的代码: export interface IPropTypes { apiKey: string; cloudChannel: string; id: string; init: EditorOptions; initialValue: string; outputFormat: ‘html’ | ‘text’; inline: boolean; modelEvents: string[] | string; plugins: string[] | string; tagName: string; toolbar: string[] | string; modelValue: string; disabled: boolean; tinymceScriptSrc: string; }

解决方法: import type{ IPropTypes } from ‘./components/EditorPropTypes’;

在import时将import {XXX} from 'XXX’改成import type {XXX} from ‘XXX’ 好像vite会出现问题,webpack正常。

本文链接地址:https://www.jiuchutong.com/zhishi/288012.html 转载请保留说明!

上一篇:CUDA-v11.2下载以及相应版本cuDNN(cuda10.1下载)

下一篇:npm,nodejs如何升级(nodejs怎么更新版本)

免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络