0

I can't install Jetstream to my Laravel project. When I use the command composer require laravel / jetstream, it will generate the following error:

[InvalidArgumentException]
The laravel / jetstream package has a PHP requirement incompatible with your PHP version, PHP 
extensions and
Composer version

My PHP version is 7.2.24, and my Composer version is 2.0.8.

Zsolt Meszaros
  • 21,961
  • 19
  • 54
  • 57
ndu
  • 7
  • 2

2 Answers2

2

Laravel Jetstream requires PHP version to be minimum 7.3 so you need to upgrade your PHP version to a minimum of 7.3. It would be better if you upgrade it to PHP 7.4 at least. As PHP 7.3 is now EOL - meaning no active support for PHP 7.3, only security fixes for one more year.

https://www.php.net/supported-versions.php

Laravel Jetstream also requires ext-json to be enabled for PHP. So depending upon your PHP version i.e. 7.3.x or 7.4.x or 8.x you need to install ext-json as well - php7.3-json or php7.4-json or php8.0-json

Donkarnash
  • 12,433
  • 5
  • 26
  • 37
2

I was having the exact same problem I just upgraded the version of my PHP 7.3 or above and you should also have laravel version 8 to use jetstream. So for upgrading the PHP version in xampp you can refer to this question.

Upgrading PHP in XAMPP for Windows?

Yash Kalra
  • 21
  • 3