gkocjan gkocjan - 4 months ago 14
Node.js Question

Bower behind proxy - summary

I had problem with bower behind proxy, after running bower install i reveived error:

_http_client.js:73
throw new TypeError('Request path contains unescaped characters.');


There are lots of topics, lots of solutions but no one work for me in 100% until now!

Answer

The solution is very simple, and was in parts in many places. But let's begin!!

  1. Export proxy settings to env:

    export HTTP_PROXY=http://<proxy_url>:<port>
    export HTTPS_PROXY=http://<proxy_url>:<port>
    

    (if doesn't work use small letters: http_proxy, https_proxy)

  2. Create file ~/.bowerrc with content:

    {
        "strict-ssl": false,
        "registry": "http://bower.herokuapp.com",
        "https-proxy": ""
    }
    

    Last line is strange but very important! After I add it everything starts working!

I hope my post will help someone who spend hours searching for solution.