Spea / SpBowerBundle

Symfony2 Bundle to handle asset dependencies with bower
231 stars 44 forks source link

Bower runtime exception #125

Closed benbieler closed 9 years ago

benbieler commented 9 years ago

Every time I run the command: 'composer update' the following happens:

$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
Updating the "app/config/parameters.yml" file
Installing bower dependencies for "SententiaregumWebBundle" into "/var/www/src/Sententiaregum/Bundle/WebBundle/Resources/config/../public/vendor"
sh: 1: /usr/bin/bower: not found

  [Sp\BowerBundle\Bower\Exception\RuntimeException]
  An error occured while installing dependencies

sp:bower:install

Script Sp\BowerBundle\Composer\ScriptHandler::bowerInstall handling the post-update-cmd event terminated with an exception

  [RuntimeException]
  An error occurred when executing the "'sp:bower:install'" command.

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [packages1] ... [packagesN]

It seems like bower is not properly installed, but if I install it: $ sudo npm install -g bower --no-bin-links, and then update composer again, the same error apears.

I would be very happy if someone could help out, because this has been an issue, that i've been trying to solve for quite some time now. :)

Spea commented 9 years ago

Can you run bower from the commandline? And if so, what is the output of which bower?

benbieler commented 9 years ago
which bower
/usr/local/bin/bower
benbieler commented 9 years ago

I've installed bower gobally: $ sudo npm install -g bower But when I run following command in the root dir: tree | grep 'bower' nothing appears... Does anybody know why? :)

Spea commented 9 years ago

Since the default location for bower is /usr/bin/bower, you have to overwrite the bower location, see the configuration reference for more info