Bower runs as Bundler on zsh/oh-my-zsh
-
21-12-2019 - |
Question
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.
Solution 3
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.
OTHER TIPS
Had the same issue. Removed the bower plugin from my .zshrc file and everything started working again.
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.