错误代码:
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.
解决方案:
本失败原因是由于tui-editor(富文本编辑器插件)更名造成的,现在已经更名为toast-ui/editor(以下第一步)
并且该插件还进行了文件名的更名(以下第二步)以及方法名的更名(以下第三步)
解决方案如下:
1.首先将package.json中的tui-editor
那一行修改为
"@toast-ui/editor": "^3.1.3",
我做到第一步就成功install了
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 搞定
答案来自于:vue-element-admin的issue
为报错并没有tui-editor,但是经测试,修改可以