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!
The solution is very simple, and was in parts in many places. But let's begin!!
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)
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.
This is an error with this version of bower. You can see the github issue here. The issue has been closed. This means your fix will be in the next version ( version > 1.3.12 ). If you can't wait update to the bleeding edge like so:
npm install -g git+https://[email protected]/bower/bower.git
If you don't like the method above see this answer for a how to install github repos via npm.
I have my proxy configured in my environment, but @gkocjan's solution only fixed bower search
for me.
To get bower install
to work, I had to put it in my .bowerrc
as well like so:
{
"strict-ssl": false,
"registry": "http://bower.herokuapp.com",
"https-proxy": "http://127.0.0.1:8118"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With