vue-element-admin安装npm install报错踩坑记录及解决办法
发布时间:2024-03-31 10:15:51 浏览量:57
vue-element-admin克隆后执行npm install
问题一、Error while executing: npm ERR! C:Program FilesGitmingw64bingit.EXE
Error while executing: npm ERR! C:Program FilesGitmingw64bingit.EXE ls-remote -h -t git://github.com/adobe-webplatform/eve.git
Error while executing: npm ERR! D:Program FilesGitcmdgit.EXE ls-remote -h -t git://github.com/ad
如何解决呢
我们需要设置git环境
git config --global url."https://".insteadOf git://
然后重新运行 npm install就行或者npm install --registry=https://registry.npm.taobao.org使用淘宝镜像
问题二、vue 初始化项目出现:npm ERR! fatal: unable to access ‘https://github.com/nhn/raphael.git/’: OpenSSL SSL_read: Connection was reset, errno 10054
npm ERR! Command failed: D:softwareGitbingit.EXE clone --depth=1 -q -b 2.2.0-c https://github.com/nhn/raphael.git C:UsersAdministratorAppDataRoamingnpm-cache_cacachetmpgit-clone-6786e754 --config core.longpaths=true
npm ERR! warning: templates not found in C:UsersADMINI~1AppDataLocalTemppacote-git-template-tmpgit-clone-848b0be7
npm ERR! fatal: unable to access 'https://github.com/nhn/raphael.git/': OpenSSL SSL_read: Connection was reset, errno 10054
npm ERR!
更换NPM源
npm config set registry https://registry.npm.taobao.org
注意:如果还出现报错,npm install 多执行几次
总结:
安装VUE-ELEMENT-ADMIN后执行npm install
1、先配置NPM源
npm config set registry https://registry.npm.taobao.org
2、在git clone下来的目录,右击打开git bash
在git bash中输入:git config --global url."https://".insteadOf git://
用https://替换git://,修改这个git环境参数
3、修改git环境参数后,执行
npm install --registry=https://registry.npm.taobao.org