Skip to content

Instantly share code, notes, and snippets.

@sheerun
Last active March 19, 2023 02:27
Show Gist options
  • Star 22 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save sheerun/c04d856a7a368bad2896ff0c4958cb00 to your computer and use it in GitHub Desktop.
Save sheerun/c04d856a7a368bad2896ff0c4958cb00 to your computer and use it in GitHub Desktop.
Proper .bowerrc file pointing to new Bower registry (if using legacy Bower version)
{
"registry": "https://registry.bower.io"
}
@cspray
Copy link

cspray commented Oct 18, 2017

In my CI environment I'm installing Bower 1.8.2, the latest version according to the GH repo, and I am still getting 410 errors. The only thing that fixed this for me was manually setting the registry in .bowerrc.

@ludamillion
Copy link

😒

@jgillick
Copy link

I was still getting the 410 errors and here's the road to my solution. TL;DR: I think it was nvm's fault, reenable your node version.

  • I upgraded bower using npm upgrade -g bower
  • Then I verified the version was 1.8.2 with bower -v
  • When I ran bower install it still gave me 410 errors.
  • When I ran it with verbose output bower install -V the end of the output showed as it was still using version 1.7.9.
  • Running which bower would show the path to the correct version.
  • It seems like nvm might be doing something wonky behind the scenes.
  • The way I solved it:
    • Re-source bash settings: source ~/.bash_profile
    • Remind nvm which version of node to use: nvm use 5.12.0 (I know I'm a bit behind)
    • Clear cache: bower cache clean
    • Try again: bower install
    • Success, have a beer.

Your milage may vary.

@AditMulyadi
Copy link

Hello,
I found this error message when i run bower install on circleci

bower EINVRES       Request to https://bower.herokuapp.com/packages/jquery failed with 502
bower install returned exit code 1

anyone knows the problem why? Is how to fix it the same as above problem ?
Thanks

@fredimachado
Copy link

Hi @AditMulyadi,
We got the same error yesterday, and updating the registry, as suggested in this Gist, fixed the issue.
Cheers!

@bjendyk
Copy link

bjendyk commented Jun 26, 2018

My builds were also failing because of bower.herokuapp.com being down since yesterday. I confirm that setting the registry as suggested in this gist fixes the problem. Thanks :) 👍

@nnrudakov
Copy link

How to update registry if I'm not using bower at all (I have no .bowerrc) but it needs for framework?

@robbie-cahill
Copy link

The other option here is to just move your dependencies to npm or yarn

@sheerun
Copy link
Author

sheerun commented Jun 28, 2018

You can use bower-away to switch to yarn and preserve the rest of your setup

@ParsaGachkar
Copy link

my .bowerrc looks like this
{
"directory": "wwwroot/lib",
"registry": "https://registry.bower.io"
}
still can't install or update anything "Using Visual Studio 2018 in a dotnet core 2.0 web application project "

Gonna give a try with VSCode and CLI

@abepetrillo
Copy link

The newest version of bower really should point to the new registry by default, not the old one. Without this thread I would have been lost. Thanks @sheerun

@DanielRuf
Copy link

Should have been also in the deprecation notices probably ;-)

@bukandu1
Copy link

my .bowerrc looks like this
{
"directory": "wwwroot/lib",
"registry": "https://registry.bower.io"
}
still can't install or update anything "Using Visual Studio 2018 in a dotnet core 2.0 web application project "
Gonna give a try with VSCode and CLI

Did you get it to work after using VSCode and CLI? My .bowerrc looks like this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment