首页IT科技vue proxy 报错 npmi(vue3+vite+typescript出现does not provide an export named ‘xxx‘ 解决方法)

vue proxy 报错 npmi(vue3+vite+typescript出现does not provide an export named ‘xxx‘ 解决方法)

时间2025-08-04 19:05:19分类IT科技浏览4770
导读: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正常      。

创心域SEO版权声明:以上内容作者已申请原创保护,未经允许不得转载,侵权必究!授权事宜、对本内容有异议或投诉,敬请联系网站管理员,我们将尽快回复您,谢谢合作!

展开全文READ MORE
html常用标签及作用(html中常见标签及其用法归纳大全) 购物车的东西如何删除(WooCommerce购物车按钮删除和隐藏几种方法(购物车里怎删掉))