关于安装vue-element-admin中npm install过程中的报错问题

为什么在npm install的过程中会报错

因为原先的tui-editor插件(也就是富文本编辑器插件)换了个名称,现在已经更名为toast-ui/editor所以安装不了,从而报错!

如何解决报错问题

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

在这里插入图片描述

2、进入\src\components\MarkdownEditor\index.vue文件,将所有import删除换成下面四行
import Editor from '@toast-ui/editor'

import "codemirror/lib/codemirror.css"

import "@toast-ui/editor/dist/toastui-editor.css"

import defaultOptions from './default-options'


3、将MarkdownEditor\index.vue页面(还是第二步中的那个vue页面)的getValue和setValue用ctrl+H分别换成getMarkdown和setMarkdown
4、重新运行npm install 命令
5、运行npm run dev 命令启动页面

在这里插入图片描述

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值