npm i 报错解决方案

在安装 vue-elementui-admin 时出现以下问题,记录下解决方案。

问题一:

ls-remote -h -t ssh://git@github.com/sohee-lee7/Squire.git

Host key verification failed

原因:没有权限访问该项目

方案:生成 ssh 公/密钥,把公钥配置在 github 上

步骤:

 

1. 生成公密钥:ssh-keygen

2. 公钥地址

C:\Users\自己计算机名\.ssh\id_rsa.pub

3. 打开浏览器登录你的github,点击右上角带黄色的头像-->settings-->(personal settings中的)SSH and GPG keys-->new SSH key-->title自己取名,key中粘贴 publickey-->Add SSH key-->成功!

github连接远程仓库时出现Warning: Permanently added the RSA host key for IP address '***********' ......_comeonbabe_的博客-CSDN博客

测试配置是否成功: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的安全机制升级导致的问题

方案:​使用https:替换git:

步骤:

git config --global url."https://".insteadOf git://

查看配置是否成功:

查看本地 git 配置文件,文件地址在 C:\Users\自己计算机名\.gitconfig

 

 fatal: remote error: The unauthenticated git protocol on port 9418 is no longer support问题解决_沛沛老爹的博客-CSDN博客

问题三:

安装成功后,运行时报一下问题:

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 中文网

 

npm install --save @riophae/vue-treeselect

问题四:

 方案:

npm install --save xlsx-style

问题五:

 方案:

修改 node_modules/xlsx-style/dist/cpexcel.js 文件第 807 行为以下内容:

var cpt = cptable;

* ./cptable in ./node_modules/_xlsx-style@0.8.13@xlsx-style/dist/cpexcel.js_OmbreDev的博客-CSDN博客

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值