首页 > 解决方案 > JSPM 无法在代理后面下载 github 包

问题描述

我在 JSPM 和 socks 隧道之间使用 http 代理。

目前正在下载 npm 包,但 jspm 无法安装 github 包。

我得到的错误来自 project/node_modules/jspm-github/github.js,当我运行例如jspm install github:aspnet/jquery-validation-unobtrusive@3.2.6

err  Error on getPackageConfig for github:aspnet/jquery-validation-unobtrusive
TypeError: Cannot read property 'match' of undefined

我在项目中的 .npmrc:

loglevel=error
progress=false
save-prefix='~'
strict-ssl=false
registry=https://nexus.vpro.nl/content/groups/npm-all/
audit=false

我的 .zprofile

# HTTP Proxy
httpProxyServer=http://127.0.0.1:8080
httpsProxyServer=http://127.0.0.1:8080

export http_proxy=$httpProxyServer
export https_proxy=$httpsProxyServer
export HTTP_PROXY=$httpProxyServer
export HTTPS_PROXY=$httpsProxyServer


export npm_config_proxy="http://127.0.0.1:8080/"
export npm_config_https_proxy="http://127.0.0.1:8080/"

和我的 .gitconfig

[http]
        proxy = http://127.0.0.1:8080
        sslVerify = false
[https]
        proxy = http://127.0.0.1:8080
        sslVerify = false
[url "https://"]
        insteadOf = git:/

标签: javascriptgithubnpmproxyjspm

解决方案


推荐阅读