zsh 5.7.1 (x86_64-apple-darwin19.0)
Here is my $PATH: in my.bash_profile
export PATH="$PATH:$HOME/.composer/vendor/bin"
export PATH="$PATH:/usr/local/opt/mysql@5.7/bin"
export PATH="$PATH:$HOME/.npm-packages/bin"
export PATH="$PATH:/usr/local/opt/node@8/bin"
export PATH="$PATH:/usr/local/bin"
export PATH="$PATH:/usr/local/sbin"
export PATH="$PATH:/usr/local/opt/php@7.2/bin"
export PATH="$PATH:/usr/local/opt/php@7.2/sbin"
I'm not sure why the laravel command isn't being found because it used to work just fine. I have the $HOME/.composer/vendor/bin
added to the path as shown in the laravel documentation https://laravel.com/docs/7.x
Any ideas why this might not be working?
I solved my problem by reinstalling composer and Laravel as well as adding composer to my path within the ~/.zshrc
file. After that, running composer commands started working again. This problem was caused by my swap from bash to zsh.
Bash and zsh are different shells and therefore use different config files.
.bash_profile
is for bash only and .zshrc
is for zsh only. You can change between the shells by typing their respective names as commands ( bash
will get you into bash from zsh and vice versa).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.