Arjen Bos
Arjen Bos

Reputation: 11

Getting an error when creating a new laravel project

whenever i try to create a new project, i get this error. any ideas on what it might be?


  Problem 1
    - laravel/framework[v8.75.0, ..., 8.x-dev] require league/flysystem ^1.1 -> satisfiable by league/flysystem[1.1.0, ..., 1.x-dev].
    - league/flysystem[1.1.0, ..., 1.x-dev] require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
    - Root composer.json requires laravel/framework ^8.75 -> satisfiable by laravel/framework[v8.75.0, ..., 8.x-dev].

To enable extensions, verify that they are enabled in your .ini files:
    - C:\PHP7\php.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-fileinfo` to temporarily ignore these required extensions.

Upvotes: 0

Views: 6412

Answers (1)

geertjanknapen
geertjanknapen

Reputation: 1437

Error tells you exactly what's happening.

laravel/framework required flysystem. flysystem requires PHP's fileinfo extension.

That seems to be disabled.

As it states go to your php.ini file (C:\PHP7\php.ini), edit the php.ini file using notepad for example. CTRL+F and search for fileinfo (or extension=php_fileinfo.dll if you want to be thorough).

In front of it should be a semicolon (;) meaning it's commented out and therefore disabled.

Remove the semicolon and go through the steps again. Should work now.

Upvotes: 3

Related Questions