Show us this and we can go from there;
type composer
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I know that there are a million threads on this problem, and at this point I believe I've tried every single one.
The problem happens whenever I call the Laravel installer: laravel new app.
When I call composer create-project --prefer-dist laravel/laravel app everything works fine.
I'm using zsh and my path looks like this:
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$HOME/.composer/vendor/bin:$PATH".
What could possibly be the reason for this not working?
It appears that using an alias for composer is not the right thing to do. I removed the alias and then renamed /usr/local/bin/composer.phar to /usr/local/bin/composer. Now running 'laravel new blog' runs without any errors. The new site has a .env file and a defined site key.
Please or to participate in this conversation.