npm-install - npm install using proxy 报错
问题描述
您好 npm install 失败,如屏幕截图所示。我正在使用代理,在安装 npm 之前,我有
- 得到nodejs,Git下载并安装。git 版本是 2.17.0.windows.1
- 为代理和注册表运行 npm config set。获得在 C:\Users\user 中创建的 .npmrc 文件。任何帮助,将不胜感激。
请查找 npm 安装日志:
user@trsrall2060597 MINGW64 /c/xyzsite/trs-b2b-ui (develop)
$ npm install
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit at ChildProcess.exithandler (child_process.js:204:12)
npm WARN addRemoteGit at emitTwo (events.js:106:13)
npm WARN addRemoteGit at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit at maybeClose (internal/child_process.js:886:16)
npm WARN addRemoteGit at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
npm WARN addRemoteGit git+https://github.com/goutamsm/ng1-protractor.git resetting remote C:\Users\user\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-goutamsm-ng1-protractor-git-8bb1045c because of error: { Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit at ChildProcess.exithandler (child_process.js:204:12)
npm WARN addRemoteGit at emitTwo (events.js:106:13)
npm WARN addRemoteGit at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit at maybeClose (internal/child_process.js:886:16)
npm WARN addRemoteGit at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
npm WARN addRemoteGit killed: false,
npm WARN addRemoteGit code: 1,
npm WARN addRemoteGit signal: null,
npm WARN addRemoteGit cmd: 'git -c core.longpaths=true config --get remote.origin.url' }
npm ERR! git clone --template=C:\Users\user\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/goutamsm/ng1-protractor.git C:\Users\user\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-goutamsm-ng1-protractor-git-8bb1045c: Cloning into bare repository 'C:\Users\user\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-goutamsm-ng1-protractor-git-8bb1045c'...
npm ERR! git clone --template=C:\Users\user\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/goutamsm/ng1-protractor.git C:\Users\user\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-goutamsm-ng1-protractor-git-8bb1045c: fatal: unable to access 'https://github.com/goutamsm/ng1-protractor.git/': Received HTTP code 407 from proxy after CONNECT
npm ERR! Windows_NT 10.0.16299
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! code 128
npm ERR! Command failed: git -c core.longpaths=true clone --template=C:\Users\user\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror https://github.com/goutamsm/ng1-protractor.git C:\Users\user\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-goutamsm-ng1-protractor-git-8bb1045c
npm ERR! Cloning into bare repository 'C:\Users\user\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-goutamsm-ng1-protractor-git-8bb1045c'...
npm ERR! fatal: unable to access 'https://github.com/goutamsm/ng1-protractor.git/': Received HTTP code 407 from proxy after CONNECT
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\xyzsite\trs-b2b-ui\npm-debug.log
解决方案
推荐阅读
- c# - 通过远程会话将 Exchange 命令行管理程序与 C# 一起使用时防止反序列化
- python - 将 img 路径从客户端传递到服务器烧瓶
- c# - DocFx 无法在 Azure Pipelines 上加载 System.Buffers.dll
- python - 减法矩阵
- laravel - 在 AWS EC2 服务器上安装任何 Laravel 包都会显示警告和错误消息,即使 Globally 安装的 composer 版本是最新的
- php - Laravel / Eloquent:请求返回表中的 id 实例计数,然后将其存储到变量中
- android - mutableStateOf 在 MainActivity 中没有更新
- node.js - 当函数在 Node 中自行返回响应所需的时间太长时,如何返回被拒绝的承诺?
- visual-studio - Xamarin ios 远程构建错误(超时 + 错误 MT0018)
- twitter-bootstrap - webpack encore 的问题:错误编译少