Take a look at your global composer.json file in /Users/yourusername/.composer. It looks like some of these dependencies are out of date. Try updating the version of these dependencies then do a composer update and see if that helps. For example, the Laravel Installer should be at version ^4.1.
Valet installation fails with php 8
I'm unable to install valet on my machine (or actually re-install, as it was running fine a couple of days ago). Mac OS Big Sur, PHP 8.0.0_1. When I run "composer install", everything seems okay: "nothing to install, update, or remove." But when I run "composer global require laravel/valet", the installation fails. I'm getting three paragraphs of problems:
Problem 1 - fxp/composer-asset-plugin is locked to version v1.4.4 and an update of this package was not requested. - fxp/composer-asset-plugin v1.4.4 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint. Problem 2 - laravel/installer is locked to version v3.0.1 and an update of this package was not requested. - laravel/installer v3.0.1 requires php ^7.2 -> your php version (8.0.0) does not satisfy that requirement. Problem 3 - laravel/installer v3.0.1 requires php ^7.2 -> your php version (8.0.0) does not satisfy that requirement. - tightenco/lambo v0.5.5 requires laravel/installer >=3.0.1 -> satisfiable by laravel/installer[v3.0.1]. - tightenco/lambo is locked to version v0.5.5 and an update of this package was not requested.
I've followed the steps in the Laravel docs in "Valet#Resetting Your Installation." Same result.
I've also checked composer.json and composer.lock files to see if there's an issue, but I can't see anything obvious. What am I doing wrong? (Thanks!)
At this point, I would just try to do a full re-install of composer.
Backup the files if you want to be safe.
Run which composer then delete that. Also delete the /Users/m/.composer folder. Then do a fresh install as described on the composer website.
At this point you'd have to reinstall all your global composer dependencies like the laravel installer and valet. Make sure you have a global composer.json file as described above. Hopefully that will sort everything out.
For reference, here's what my /Users/dre/.composer/composer.json file looks like. I have a new computer which I just setup last week.
{
"require": {
"laravel/valet": "^2.13",
"laravel/installer": "^4.1",
"beyondcode/expose": "^1.4"
}
}
On second thought, you might have something weird going on in your .bashrc or .zshrc file. Check out those files too and investigate. Should be in the /Users/m/ folder.
Please or to participate in this conversation.