myTerminal myTerminal - 8 months ago 69
Node.js Question

Not able to run bower on Travis CI

I have almost tried every possible thing here, but am not able to run builds on Travis CI as it errors out on bower.

I know this question might sound like a duplicate, but I have tried the usual fix that seems to be working for everyone else, but not for me :)

An example:

My repository is and you can find it on Travis CI at


You can try installing bower in before_install rather than before_script. Your .travis.yml would look like:

language: node_js
  - "0.11"
  - npm install -g grunt-cli bower
  - bower install
sudo: required

The way Node.js applications are built on Travis CI is that is executes before_script after install (which does npm install), before_script is something that is executed after the install step.

You need bower during your npm install, hence your build fails.