首页 > 其他分享 >npm ERR /usr/bin/git ls-remote -h -t git://github.com/adobe-webplatform/eve.git

npm ERR /usr/bin/git ls-remote -h -t git://github.com/adobe-webplatform/eve.git

时间:2022-10-10 17:23:39浏览次数:55  
标签:npm bin git ERR toast ui editor

安装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 搞定
————————————————
版权声明:本文为CSDN博主「qq_39009944」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_39009944/article/details/124017880

标签:npm,bin,git,ERR,toast,ui,editor
From: https://www.cnblogs.com/muyi0813/p/16776460.html

相关文章