petervandijck's avatar

Can't install Vapor CLI

Working on a new laptop, Macbook. I am working with Laravel. I have a Vapor project, that I was coding on another laptop, all worked well. (The other laptop broke). Now on this new laptop, I can't seem to install vapor CLI?

I installed vapor CLI globally:

composer global require laravel/vapor-cli --update-with-dependencies

That worked well apparently. But then I can't use vapor

php vapor list
Could not open input file: vapor

php vendor/bin/vapor list
Could not open input file: vendor/bin/vapor

I am a bit stuck, not sure how to fix this or where to look. Any ideas?

0 likes
2 replies
riggerz29's avatar

Super late to the party, but I finally upgraded to a new Mac and initially ran the same global install command, which resulted in the same issue.

So if anyone new has the same issue and reads this, you can fix it by simply adding the composer path to your .zshrc file, which Mac uses by default.

In my case the path to composer path is :

    export PATH="$HOME/.composer/vendor/bin:$PATH"

Open your .zshrc file by running :

    sudo nano ~/.zshrc

Add the path to the file and restart the terminal or run:

    source ~/.zshrc

The you should be able to run :

    vapor --version

Please or to participate in this conversation.