![](https://img.laitimes.com/img/9ZDMuAjOiMmIsIjOiQnIsIyZuBnL3QDZkF2YxImZ5cjZ0I2MiFTZlRTZjNWZ5MzY5QGZ0IzLc52YucWbp5GZzNmLn9Gbi1yZtl2Lc9CX6MHc0RHaiojIsJye.png)
vue-element-admin運作npm install 報錯完美解決!(親測有用)
vue-element-admin運作npm install 報錯完美解決!(親測有用)
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/nhn/raphael.git
npm ERR! [email protected]: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\17605\AppData\Local\npm-cache\_logs\2022-03-21T10_41_46_956Z-debug.log
網上也是看了好多文章,嘗試了好幾種辦法,修改.gitconfig檔案,配置過tb鏡像,也重新配置過GitHub的ssh,還是未能解決,最後看見一篇直接删除依賴的,删除完了就解決了。
具體如下:
1、打開package.json把"tui-editor"删掉
2、删除"tui-editor"相關路由、components,具體檔案位址如下:
- 路由位置:
src/router/modules/components.js 搜尋"markdown",把相應markdown路由代碼删除;
- components位置:
src/components/MarkdownEditor 删除後,再執行npm install 或 npm install --registry=registry.npm.taobao.org 下載下傳并運作成功!
3、啟動項目 npm run dev
附:
Github位址: https://github.com/PanJiaChen/vue-element-admin