A hurdle I faced while installing Laravel 10
I was recently upgrading one of my Laravel apps to its newest version, i.e. Laravel 10. And while doing so, I faced a hurdle that I thought I should share with you.
So, as mentioned in the upgrade guide, I updated the version of laravel/framework
and other dependencies in composer.json
and then I ran the composer install
command. The command aborted in between with the following error.
The thing to notice here is this error in particular.
Root composer.json requires laravel/sanctum ^2.15.1 -> satisfiable by laravel/sanctum[v2.15.1].
Essentially, for some reason, the laravel/sanctum
package had some dependency issues. So, I ran the following command to install the package.
composer require laravel/sanctum
This somehow fixed the issue and I was able to install Laravel 10 successfully.
The moral of the story is, if you are upgrading your Laravel app to its latest version and you are getting some dependency issues, try running the composer require
command for the package that is causing the issue.
👋 Hi there! I'm Amit. I write articles about all things web development. If you like what I do and want me to continue doing the same, I'd like you consider leaving a tip. I'd highly appreciate that. Cheers!