4

Whenever I run bower install or any bower command, it ends up running as bundle install or something else from bundler. I'm running a zsh shell with oh-my-zsh. It works as expected in a bash shell.

Example output:

% bower install
bundle install requires at least 0 argument: "bundle install".

Running whence -p bower yields /usr/local/bin/bower, which is symlinked to /usr/local/lib/node_modules/bower/bin/bower.

Running /usr/local/bin/bower install works just fine. I'm thinking there is a place where bundle or bower has been aliased wrong, or oh-my-zsh's autocomplete isn't working properly, but I can't imagine where that would be. I could add alias bower='/usr/local/bin/bower' to my .zshrc but I'd like to solve this properly.

Thanks for any help.

Mike
  • 152
  • 7
  • 1
    Did you report a bug? I reported one: https://github.com/robbyrussell/oh-my-zsh/issues/2486 but you should do it yourself next time. – mgol Feb 01 '14 at 21:07
  • 1
    @m_gol I didn't, as I eventually just uninstalled bower and bundler and reinstalled them and it started working somehow. Thanks for submitting that! – Mike Feb 04 '14 at 22:45

3 Answers3

3

Had the same issue. Removed the bower plugin from my .zshrc file and everything started working again.

mvilrokx
  • 1,588
  • 1
  • 16
  • 23
1

Use whence -vs bower to find zsh's interpretation of bower. -v will add the type if it's not a command, -s will also show a symlink-free path in case the pathname contains symlinks.

whence -p bower does a path search even if it is an alias or function and will only return found paths but nothing else. So this will not help you to find if it is an alias.

Adaephon
  • 16,929
  • 1
  • 54
  • 71
1

I personally fixed this by uninstalling and reinstalling bower and bundler. However, it seems (as I thought) that ZSH was somehow overriding one with the other. @m_gol has been kind enough to submit a fix in oh-my-zsh to fix this.

Mike
  • 152
  • 7