Get "PHP 8 in a Nuthshell" (Now comes with PHP 8.3)
Amit Merchant

Amit Merchant

A blog on PHP, JavaScript, and more

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.

Laravel 10 installation 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.

Laravel 10 installation success

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.

Learn the fundamentals of PHP 8 (including 8.1, 8.2, and 8.3), the latest version of PHP, and how to use it today with my new book PHP 8 in a Nutshell. It's a no-fluff and easy-to-digest guide to the latest features and nitty-gritty details of PHP 8. So, if you're looking for a quick and easy way to PHP 8, this is the book for you.

Like this article? Consider leaving a


👋 Hi there! I'm Amit. I write articles about all things web development. You can become a sponsor on my blog to help me continue my writing journey and get your brand in front of thousands of eyes.