vue-element-admin
vue-element-admin copied to clipboard
npm install 报错,怎么搞? 哪里问题?
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! command-line line 0: unsupported option "accept-new". 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:
Other relevant information(格外信息)
- Your OS:
- Node.js version:
- vue-element-admin version:
跟你一样得问题, 换yarn安装试试
开一个加速器试试 比如 ~~~
同问,npm config用了socks5代理也不行
git config --global url."https://".insteadOf ssh://git@ 使用这个命令 将ssh 下载变成https就行了 加油 小伙伴们
同问,npm config用了socks5代理也不行
配置的是 ssh 再怎么用代理 你也下载不下来 ssh的 要配置密钥的 换成 https 就行了
我碰到过405
方法一: 挂代理,目前最有效 git config --global http.proxy http://127.0.0.1:1080 git config --global https.proxy https://127.0.0.1:1080
方法二: 1、在项目目录下创建文件:.npmrc 内容: sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ registry=https://registry.npm.taobao.org 2、命令行 git config --global url."https://github.com/nhn/raphael.git".insteadOf ssh://[email protected]/nhn/raphael.git git config --global url."https://github.com/adobe-webplatform/eve.git".insteadOf ssh://[email protected]/adobe-webplatform/eve.git
方法三: 在项目目录下执行命令: git --no-replace-objects ls-remote https://github.com.cnpmjs.org/nhn/raphael.git git --no-replace-objects ls-remote https://github.com.cnpmjs.org/adobe-webplatform/eve.git
方法四: 换个时间,随缘
npm install 多执行几次,目前能找到的解决方法
方法一: 挂代理,目前最有效 git config --global http.proxy http://127.0.0.1:1080 git config --global https.proxy https://127.0.0.1:1080
方法二: 在项目目录下创建文件:.npmrc 内容: sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ registry=https://registry.npm.taobao.org
方法三: 在项目目录下执行命令: git --no-replace-objects ls-remote https://github.com.cnpmjs.org/nhn/raphael.git git --no-replace-objects ls-remote https://github.com.cnpmjs.org/adobe-webplatform/eve.git
方法四: 换个时间,随缘
npm install 多执行几次,目前能找到的解决方法
方法三works for me
单独下载 npm install --save raphael
git config --global url."https://".insteadOf ssh://git@ 使用这个命令 将ssh 下载变成https就行了 加油 小伙伴们
谢谢啊,终于解决,蛋疼死了
git --no-replace-objects ls-remote https://github.com.cnpmjs.org/nhn/raphael.git
方法四最有用 0V0
已收到!
我在centos上也遇到问题,服务器在香港,不存在翻墙问题,所以排除代理问题,ssh key 也创建了,确认能用,最后发现原来是npm版本问题,新装的默认是8.x 降级到6 就可以了 npm install [email protected] -g
已收到!
`
.gitconfig
https://github.com/PanJiaChen/vue-element-admin/issues/3859
[url "https://github.com/nhn/raphael.git"] insteadOf = ssh://[email protected]/nhn/raphael.git [url "https://github.com/adobe-webplatform/eve.git"] insteadOf = git://github.com/adobe-webplatform/eve.git `
git config --global url."https://".insteadOf ssh://git@ 使用这个命令 将ssh 下载变成https就行了 加油 小伙伴们
哥,thanks~
都不行,郁闷
垃圾实现,这种动态下载依赖的方式,完全绕过了npm源,公司的npm私服或者像淘宝这种镜像站点都不起作用了。
刚开始错误怀疑是node JS或 NPM 包版本不兼容引起的,实际上并不是,也不是什么网络问题引起。
实际上发现很坑的一个根本原因是:
1.这个类库下载是通过ssh://[email protected]/nhn/raphael.git 命令下载的
2 也就是说,你必须处于登录状态或配置了访问github 的ssh key 才可以访问成功,
你们可以试试,如果未登录状态是压根看不到这个ssh 下载方式选项的
试验了如下方法:
- [x] 降低npm版本到17、16,无效❌
- [x] npm install --save raphael,有效✅
碰到新问题:
npm WARN deprecated [email protected]: use String.prototype.padStart()
[ ...............] \ fetchMetadata: sill resolveWithNewModule [email protected] checking
npm ERR! code 128
npm ERR! Command failed: git clone --depth=1 -q -b fix/ie-cannot-input-korean https://github.com/sohee-lee7/Squire.git /home/ff/.npm/_cacache/tmp/git-clone-54a648c7
试验了如下方法:
- [x] git config --global url."https://github".insteadOf github: ❌无效
- [x] hosts: 199.232.68.133 raw.githubusercontent.com ❌无效
后来百般打听,听说vue-element-admin必须使用node 12版本。
亲测使用pnpm可以成功下载依赖,如果下载过程遇到git ssh 的问题请安装依赖前先执行以下命令: git config --global url."https://github.com/nhn/raphael.git".insteadOf ssh://[email protected]/nhn/raphael.git git config --global url."https://github.com/adobe-webplatform/eve.git".insteadOf ssh://[email protected]/adobe-webplatform/eve.git
亲测 npm config set proxy http://yourproxy:8080 成功