28

Recently my bower tasks have been failing and returning a 410 error message like below:

2017-10-11T13:22:21.2226829Z bower angular-cookies#v1.6.7-build.5456+sha.3651e42
EINVRES Request to https://bower.herokuapp.com/packages/angular-cookies failed with 410

2017-10-11T13:22:21.2706832Z ##[error]Bower failed with error: C:\NPM\Modules\bower.cmd failed with return code: 1

I haven't actually changed anything in this project I'm just spinning up a new instance in a test slot. Does anyone know why this has started happening?

shA.t
  • 16,580
  • 5
  • 54
  • 111
BigTallJosh
  • 866
  • 12
  • 24

2 Answers2

44

This is because bower has changed the registry url today without a redirect.

The preferred method is to update bower:

npm upgrade -g bower

However if you are unable to do so for whatever reason you can edit your .bowerrc file to include this to point to the new url.

{
     "registry": "https://registry.bower.io"
}
BigTallJosh
  • 866
  • 12
  • 24
  • It's not a recommended solution. Recommended solution is to update bower (npm install -g bower) – sheerun Oct 17 '17 at 20:58
  • 2
    I deploy to Heroku which downloads bower as a dependency. I had an "exact match" version in the package.json which caused this issue for me. Answer got me there! – travisneids Oct 18 '17 at 15:27
7

You need upgrade your bower.

npm upgrade -g bower

Please take a look for upgrade solutions here.

Eren Ayhan
  • 71
  • 2