vue-element-admin npm install 安装失败,tui-editor更名导致

导语:

本失败原因是由于tui-editor(富文本编辑器插件)更名造成的,现在已经更名为toast-ui/editor;

在一个是一直以为是我的git问题 报错代码:code 128 ..........,困扰了我好长时间,所以在此记录一下,希望让看到文章的朋友们少走弯路。

解决方案如下:

  1. 首先将package.json中的tui-editor那一行修改为"@toast-ui/editor": "^3.1.3",

  2. 进入\src\components\MarkdownEditor\index.vue文件,将他的所有import删除换成下面四行

    import 'codemirror/lib/codemirror.css'
    import '@toast-ui/editor/dist/toastui-editor.css'
    import Editor from '@toast-ui/editor'
    import defaultOptions from './default-options'

  3. 把该页面(还是第二条中的文件)的getValue和setValue分别换成getMarkdown和setMarkdown

把页面中的所有tui-editor全部替换为@toast-ui/editor

4.保存文件,npm install 搞定

相关推荐
xiaofeichaichai2 小时前
Webpack
前端·webpack·node.js
问心无愧05132 小时前
ctf show web入门111
android·前端·笔记
唐某人丶2 小时前
模型越来越强,我们还需要 Agent 工程吗?—— 从价值重估到 Harness 实践
前端·agent·ai编程
智码看视界2 小时前
现代Web开发基础:全栈工程师的起航点
前端·后端·c5全栈
JS菌3 小时前
手写一个 AI Agent 全栈项目:从沙箱执行到子智能体的完整实现
前端·人工智能·后端
excel4 小时前
HLS TS 文件损坏的元凶:Git 提交与拉取
前端
Aphasia3114 小时前
https连接传输流程
前端·面试
徐小夕4 小时前
万字长文!千万级文档 RAG 知识库系统落地实践
前端·算法·github
梦梦代码精4 小时前
2026年PHP开源商城系统实测对比:架构、多商户、商用授权,谁才是真·省心?
vue.js·docker·架构·开源·代码规范