安装vue-element-ui 的依赖包报错(亲测有效)

安装vue-element-ui 的依赖包报错
npm install 出错
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t git://github.com/adobe-webplatform/eve.git
npm ERR!
npm ERR! fatal: remote error:
npm ERR! The unauthenticated git protocol on port 9418 is no longer supported.
npm ERR! Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
npm ERR!
npm ERR! exited with error code: 128

原因:
由于tui-editor(富文本编辑器插件)更名造成的,现在已经更名为toast-ui/editor(以下第一步)
并且该插件还进行了文件名的更名(以下第二步)以及方法名的更名(以下第三步)

解决方案如下:
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 搞定

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值