skip to Main Content

I’m starting a new Laravel 11 project and I want to use Filament from the start. The Laravel installation went fine but I run into problems when I try to install Filament.

I run this command to start the installation:
composer require filament/filament:"^3.2" -W

I then get the following error:

The "3.2" constraint for "filament/filament" appears too strict and will likely not match what you want. See https://getcomposer.org/constraints
./composer.json has been updated
Running composer update filament/filament --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1                                                                                                                                                                                                                      
    - illuminate/console[v10.0.0, ..., v10.48.3] require nunomaduro/termwind ^1.13 -> found nunomaduro/termwind[v1.13.0, ..., v1.15.1] but these were not loaded, likely because it conflicts with another require.              
    - filament/filament v3.2.0 requires illuminate/console ^10.0 -> satisfiable by illuminate/console[v10.0.0, ..., v10.48.3].                                                                                                   
    - Root composer.json requires filament/filament 3.2 -> satisfiable by filament/filament[v3.2.0].                                                                                                                             
                                                                                                                                                                                                                                 

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

How can I solve this problem?

This is my composer.json file. The Laravel version is specified because composer would otherwise revert to 1.0.0:

{
    "name": "laravel/laravel",
    "version": "11.0",
    "type": "project",
    "description": "The skeleton application for the Laravel framework.",
    "keywords": ["laravel", "framework"],
    "license": "MIT",
    "require": {
        "php": "^8.2",
        "laravel/framework": "^11.0",
        "laravel/tinker": "^2.9"
    },
    "require-dev": {
        "fakerphp/faker": "^1.23",
        "laravel/pint": "^1.13",
        "laravel/sail": "^1.26",
        "mockery/mockery": "^1.6",
        "nunomaduro/collision": "^8.0",
        "phpunit/phpunit": "^10.5",
        "spatie/laravel-ignition": "^2.4"
    },
    "autoload": {
        "psr-4": {
            "App\": "app/",
            "Database\Factories\": "database/factories/",
            "Database\Seeders\": "database/seeders/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\Foundation\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-update-cmd": [
            "@php artisan vendor:publish --tag=laravel-assets --ansi --force"
        ],
        "post-root-package-install": [
            "@php -r "file_exists('.env') || copy('.env.example', '.env');""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi",
            "@php -r "file_exists('database/database.sqlite') || touch('database/database.sqlite');"",
            "@php artisan migrate --ansi"
        ]
    },
    "extra": {
        "branch-alias": {
            "dev-master": "11.x-dev"
        },
        "laravel": {
            "dont-discover": []
        }
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true,
        "allow-plugins": {
            "pestphp/pest-plugin": true,
            "php-http/discovery": true
        }
    },
    "minimum-stability": "stable",
    "prefer-stable": true
}

I’ve tried solving the issue by running composer install and composer update. This didn’t help.

2

Answers


  1. Add "filament/filament": "^3.2.0", to your composer.json and then run the composer update.
    its works for me

    Login or Signup to reply.
  2. "composer require filament/filament="3.2.57" -W" use this version of fillament.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search