在安裝 vue-elementui-admin 時(shí)出現(xiàn)以下問題,記錄下解決方案。
問題一:
ls-remote -h -t ssh://git@github.com/sohee-lee7/Squire.git
Host key verification failed
原因:沒有權(quán)限訪問該項(xiàng)目
方案:生成 ssh 公/密鑰,把公鑰配置在 github 上
步驟:
?
1. 生成公密鑰:ssh-keygen
2. 公鑰地址
C:\Users\自己計(jì)算機(jī)名\.ssh\id_rsa.pub
3. 打開瀏覽器登錄你的github,點(diǎn)擊右上角帶黃色的頭像-->settings-->(personal settings中的)SSH and GPG keys-->new SSH key-->title自己取名,key中粘貼 publickey-->Add SSH key-->成功!
github連接遠(yuǎn)程倉庫時(shí)出現(xiàn)Warning: Permanently added the RSA host key for IP address '***********' ......_comeonbabe_的博客-CSDN博客
測(cè)試配置是否成功:ssh -T?git@github.com?
GitHub添加公鑰_thinkhui的博客-CSDN博客_github公鑰
問題二:
?fatal: remote error:
The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
原因:github的安全機(jī)制升級(jí)導(dǎo)致的問題
方案:?使用https:替換git:
步驟:
git config --global url."https://".insteadOf git://
查看配置是否成功:
查看本地 git 配置文件,文件地址在 C:\Users\自己計(jì)算機(jī)名\.gitconfig
?
?fatal: remote error: The unauthenticated git protocol on port 9418 is no longer support問題解決_沛沛老爹的博客-CSDN博客
問題三:
安裝成功后,運(yùn)行時(shí)報(bào)一下問題:
To install them, you can run: npm install --save @riophae/vue-treeselect @riophae/vue-treeselect/dist/vue-treeselect.css xlsx-style
?方案:
官方文檔:Vue-Treeselect | Vue-Treeselect 中文網(wǎng)
?
npm install --save @riophae/vue-treeselect
問題四:
?方案:
npm install --save xlsx-style
問題五:
?方案:
修改?node_modules/xlsx-style/dist/cpexcel.js
?文件第 807 行為以下內(nèi)容:文章來源:http://www.zghlxwxcb.cn/news/detail-670884.html
var cpt = cptable;
* ./cptable in ./node_modules/_xlsx-style@0.8.13@xlsx-style/dist/cpexcel.js_OmbreDev的博客-CSDN博客文章來源地址http://www.zghlxwxcb.cn/news/detail-670884.html
到了這里,關(guān)于npm i 報(bào)錯(cuò)解決方案的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!