What is the main Bower registry URL?
We're trying to set up Bower to use our registry first, then the "official" Bower registry second.
We've created our own little Bower registry based on the endpoints exposed in [bower/registry]1. Works great.
Based on this doc, it looks like we need to create a .bowerrc file with an array of registries like
{
"registry": {
"search": [
"http://myCustomRegistry/api",
"theMainBowerRegistry"
]
}
}
Works fine for use my custom registry, but I can't find the URL for the main Bower registry. Anyone?
The default registry URL is => https://bower.herokuapp.com
Now it is https://registry.bower.io
https://twitter.com/bower/status/908359136601133056
See the explanation https://gist.github.com/sheerun/c04d856a7a368bad2896ff0c4958cb00
The default registry as of now is https://raw.githubusercontent.com/bower/components/1.0.0 for anyone looking in 2017. Entering this into my .bowerrc file solved my ECONNRESET errors. Bower moved away from the herokuapp repository it was using to Github.
The link to Bower's link on Twitter describing this move is linked below.
https://twitter.com/bower/status/796046017133211648
Actually, it's just https://bower.herokuapp.com. /packages is part of the REST API routes, which would create redundant URL segments in your Bower requests (e.g. https://bower.herokuapp.com/packages/search/bootstrap`).
Related
Schemacrawler makes reference to a "configuration file", e.g. in https://www.schemacrawler.com/diagramming.html it says:
Show column ordinals, by setting configuration option schemacrawler.format.show_ordinal_numbers=true in the configuration file.
But I've not found what and where that file is.
I run Schemacrawler from its provided Docker images and struggle to make sense of where to configure e.g. schemacrawler.format.show_ordinal_numbers=true as referenced in the above docs.
Anyone know how this is intended to work?
(BTW I'm asking on SO because their repository suggests to do so)
Seems it makes use of this file: config/schemacrawler.config.properties.
From its Github repo I found these links:
Diagram Readme
Sample config file
Jon,
Please use the latest SchemaCrawler Docker image. When you open a shell in this Docker container, you will have a schemacrawler.config.properties file in the home directory. You can edit this file in vi, and then use it with SchemaCrawler by providing an additional -g ./schemacrawler.config.properties command-line switch. Instructions are provided on the Docker Hub SchemaCrawler page.
Sualeh Fatehi, SchemaCrawler
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.
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.
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.
This is a follow-up to this question. I'm using bower 0.7.1, and still cannot get the components to be installed anywhere else than in the components folder.
I tried adding the following line to my component.json, as per this PR:
"componentsDirectory": "public/components"
But it will still install in ./components.
I tried to create a .bowerrc file next to component.json:
{
"directory" : "public/components"
}
But I get this error when running bower install:
Error: Unable to parse local .bowerrc file: Unexpected token }
Any idea?
Actually the .bowerrc file does work, this was an issue with my IDE not saving the file properly:
{
"directory" : "public/components"
}
I'm still wondering why componentsDirectory still doesn't work in component.json, though.
While you can happily use Bower to manage the dependencies of your own personal projects, primarily the component.json is a description of your project for other people. If you share a component through the Bower registry the component.json goes with it to describe the dependencies. That is why your own local preferences like where to install components don't belong in there.
Another way to change installation directory temporarily is using --config option in command line:
bower install jquery --config.directory=/path/to/your/components
If you are creating this file in Notepad++, make sure the Encoding is set to "Encode in UTF-8 without BOM" and save as file type "Any".