When I run bower install, I get the following error:
Request to https://bower.herokuapp.com/packages/jquery failed with
ETIMEDOUT,
retrying in 1.8s
But when I run the same URL in the address bar of Chrome, I get the json. I don't know why it fails when I do bower install using Windows 7 command shell. I suspect it has got something to do with my workplace's proxy settings.
Anyone?
Try edit .bowerrc
"proxy":"http://<host>:<port>",
"https-proxy":"http://<host>:<port>",
"strict-ssl": false
Have you tried something like http_proxy='proxyserver' https_proxy='proxyserver' bower install? (where proxyserver is your proxy)
Getting error related to proxy when no proxy is configured: May be npm is picking up proxy.
Delete the proxy attribute from npm config and try. Use:
npm config delete proxy
This solved my problem.
You need to set the new registry for bower in .bowerrc:
{
"registry": "https://registry.bower.io"
}
The old url https://bower.herokuapp.com/ is no more available.
In my case (Win7), this problem was fixed by providing bower with the proxy settings.
As #Robert Moon mentioned in his answer, you can place this settings in the .bowerrc file.
For proxies that require authentication you will need to provide it as follows:
http://domain\username:password#proxyserverurl:port
The back slash is particularly tricky since it needs to be escaped in the .bowerrc file
Example .bowerrc:
{
"directory": "bower_components",
"proxy": "http://domain%5Cusername:password#proxyserverurl:port",
"https-proxy": "http://domain%5Cusername:password#proxyserverurl:port",
"no-proxy":"localserver.domain.com"
}
The official documentation from Bower that mentions proxy settings:
https://bower.io/docs/config/#bowerrc-specification
I was also stuck with the same error. The following steps fixed the error for me:
Remove any existing proxy: npm config delete proxy
Then set proxy using: npm config set proxy http://<host>:<port>
You may also need to change the proxy settings for git:
git config --global http.proxy http://<host>:<port>
Now edit the .bowerrc file as described by Robert Moon
"proxy":"http://<host>:<port>",
"https-proxy":"http://<host>:<port>",
"strict-ssl": false
Prod server build bower well, but the develop server does not build, it is stop with ETIMEDOUT.
The error went through when I added:
"timeout": 120000
into .bowerrc.
Info from page https://bower.io/docs/config/ helped me.
Related
My bower has just started giving errors when I do a grunt build. In particular, I am seeing errors like:
Warning: Request to https://bower.herokuapp.com/packages/angular failed with 502 Use --force to continue.
Doing some research, it looks like the registry server has changed from bower.herokuapp.com to registry.bower.io. However, my bower is still hitting the old server.
My bower is updated to the latest version: 1.8.4.
I've cleared my bower cache, just in case.
Not sure what to do next.
UPDATE:
I was able to specify the registry locally in my .bowerrc file, but I would still like to know how to get it to hit the new registry by default.
{
"directory": "app/bower_components",
"registry": {
"search": [
"https://registry.bower.io"
]
}
}
I am going to develop a chat application with MongooseIM Server, but fail to install MongooseIM sever setup on my local pc, Can any one please help me to fix this error, Thanks in advance.
Following : http://mongooseim.readthedocs.io/en/1.5.1/user-guide/Getting-started/
error :
===> Failed to fetch and copy dep:{git,"git://github.com/goj/base16.git"{ref, "f78918e7b593fbdc35ec9bcc349aa50f47f45a8b
I see those dependences are expressed using the git:// protocol.
Try instead using the https one:
git config --global url."https://".insteadOf git://
And see if the same process still fails.
Make sure you are using a recent version of git (what git --version returns?)
Having some trouble registering a bower package to a remote repository which should be possible with the version I have (artifactory.version: 4.9.1)
So there is a repo there thats setup and it has a URL of http://mygetserver.domain.com/git which hits the gitolite page for browsing the git repos (which seems odd)
The registry url is pointing at the default of https://bower.herokuapp.com/
With the Bower Settings pointing to Custom and a default URL of {0}/{1}/archive/{2}.{3} - Again that feels weird but I have no idea whats expected in there
So when I try and register a package with
bower register nh-styles git#mygetserver.domain.com:nh-styles.git --verbose
I get an error to say
Error: Unknown error: 404 - Unable to determine coordinates from url git#mygetserver.domain.com:nh-styles.git
If I change that to use ssh:// first then it works
C:\Dev>bower register nh-styles
ssh://git#mygetserver.domain.com/nh-styles.git --verbose bower
nh-styles#* resolve
ssh://git#mygetserver.domain.com/nh-styles.git#* bower nh-styles#*
checkout v0.0.4 bower nh-styles#* old-git It seems you
are using an old version of git, it will be slower and propitious to
errors! bower nh-styles#* invalid-meta nh-styles is missing
"ignore" entry in bower.json bower nh-styles#* resolved
ssh://git#mygetserver.domain.com/nh-styles.git#0.0.4 ? Registering a
package will make it installable via the registry
(http://myart.artifactorydomain.com:8081/artifactory/api/bower/bower-nh-git
? Registering a package will make it installable via the registry
(http://myart.artifactorydomain.com:8081/artifactory/api/bower/bower-nh-git
), continue? Yes bower nh-styles register
ssh://git#mygetserver.domain.com/nh-styles.git
Package nh-styles registered successfully! All valid semver tags on
ssh://git#mygetserver.domain.com/nh-styles.git will be available as
versions. To publish a new version, just release a valid semver tag.
Run bower info nh-styles to list the available versions.
C:\Dev>bower info nh-styles bower nh-styles#* not-cached
art://nh-styles/nh-styles#* bower nh-styles#* resolve
art://nh-styles/nh-styles#* bower EREQUEST
Request to
http://myart.artifactorydomain.com:8081/artifactory/api/bower/bower-nh-git/refs/nh-styles/n
h-styles returned 404 status code.
Additional error details: [object Object]
Yet when I try and Info nothing shows. Every time I resubmit I'm getting a 201 rather than a package exists issue. So basically why is it not being saved? Artifactory logs are showing nothing I can see. Anything else I can look at?
The reason you must include ssh:// is that the bower resolver need to know what protocol it has to use when accessing the specified url, this is also documented here. Also I noticed you used domain.com:nh-styles.git this is not a valid url, because of the : -- it might also work like this without the ssh:// part i'm not sure.
The way registering a package with Artifactory works is that it simply acts as the registry in a sense that it simply keeps a mapping of the package name to the git url you gave it. That's also why registering a package will have no other apparent effect (except for the 201 response).
The behavior is pretty much identical to the bower public registry in this aspect.
The error itself you're getting is because Artifactory can't find the git repo you're referring to in the registered git repository - check that the repo at the url you gave is accessible - you can also turn on debug logs on org.artifactory.addon.bower to see the exact error Artifactory encountered if it's not already printing something to the log about this.
I got the CERT_UNTRUSTED when I tried to run bower install command to install components.
For example, I got this error when I ran the following:
bower install bootstrap-sass-official --save
The output was:
bower error Request to https://bower.herokuapp.com/packages/bootstrap-sass-official failed: CERT_UNTRUSTED
Note: This is not a package specific error. This happens when you try to install any package, not just with bootstrap-sass-official.
you can try setting this in .bowerrc:
{
"directory": "bower_components",
"registry": "http://bower.herokuapp.com",
"strict-ssl": false
}
I found a quick fix for this issue. I guess the issue is happening because of my company's SSL settings.
I changed the registry search as follows (in my windows laptop) and it fixed the issue.
set registry.search=http://bower.herokuapp.com
This should work in unix systems as well, where you have to create a env variable with above key and value.
You can also change the registry setting at .bowerrc file.
You can follow as a quick and dirty fix. Do not make it as a permanent solution.
I have trouble connecting to sites with ssl, i.e. https. It can successfully download artifacts from the internet if the url begins with http.
bower install will download dependencies via https. Is there anyway make it download via http?
I had troubles with this too, and I couldn't find an elegant way to fix it. My workaround was:
Go to your global npm folder and find the "bower" folder (on Windows 7 that is "C:\Users\\AppData\Roaming\npm\node_modules").
In that folder, search the default.js file placed in node_modules\bower-config\lib\util\default.js
Inside that file you will find a "var defaults". Replace the "registry" url property from "https" to "http".
Yes, I know. This shouldn't be done like this, but at least help me to bypass the connection error.
Hope that helps!
You can change the registry used by Bower in the .bowerrc file. The default registry is: https://bower.herokuapp.com and is defined in node_modules/bower-config/lib/util/default.js (as described by Jean Manuel Arias in his answer).
To override for your project, add a value for the registry setting in .bowerrc. An example file might be:
{
"directory": "<YOUR LIBRARY INSTALL DIRECTORY>",
"registry":"http://bower.herokuapp.com"
}
In the above example, the default https registry is being overridden with the http version. A full list of the available .bowerrc settings can be found at: Bower Spec.
You can do a global override for the current user by creating a %USERPROFILE%\.bowerrc file (for windows, in Linux it is: ~/.bowerrc). Bower follows a similar search path when applying settings to NPM (see npmrc settings). This is probably a better route as it avoids cluttering your project with local settings.