every php artisan command throws error

This error popped up while upgrading from v2 to v3
35 Replies
Dennis Koch
Dennis Koch2y ago
You are very likely on Livewire v2 and Filament v3-alpha. Please check your composer.json.
Matthew
MatthewOP2y ago
sigh Idk whats going on. Ive started 3 different projects from scratch and I cant seem to install it properly I cant install or upgrade livewire
Dennis Koch
Dennis Koch2y ago
You need minimum-stability dev and LW3
Matthew
MatthewOP2y ago
I cant upgrade with minimum stability dev In short i need minimum stability dev for BOTH filament v3 and livewire v3?
Matthew
MatthewOP2y ago
Matthew
MatthewOP2y ago
I installed livewire v3 and now I get this when installing filament v3 (Fresh project)
Patrick Boivin
Can you share your composer.json?
Matthew
MatthewOP2y ago
of course
{
"name": "laravel/laravel",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": ["laravel", "framework"],
"license": "MIT",
"require": {
"php": "^8.1",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.2",
"laravel/tinker": "^2.8",
"livewire/livewire": "^3.0@beta"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"laravel/pint": "^1.0",
"laravel/sail": "^1.18",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^7.0",
"phpunit/phpunit": "^10.1",
"spatie/laravel-ignition": "^2.0"
},
"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"
]
},
"extra": {
"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": "dev",
"prefer-stable": true
}
{
"name": "laravel/laravel",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": ["laravel", "framework"],
"license": "MIT",
"require": {
"php": "^8.1",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.2",
"laravel/tinker": "^2.8",
"livewire/livewire": "^3.0@beta"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"laravel/pint": "^1.0",
"laravel/sail": "^1.18",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^7.0",
"phpunit/phpunit": "^10.1",
"spatie/laravel-ignition": "^2.0"
},
"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"
]
},
"extra": {
"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": "dev",
"prefer-stable": true
}
It should be noted that I am trying to run this on a VM. I doubt this has anything to do with it but I just feel its good to state it
Patrick Boivin
Yeah, good to know! Shouldn't be an issue. Can you remove this line: "livewire/livewire": "^3.0@beta" and try composer require -W filament/filament:"^3.0" again ? If this is a test project, I think you can safely remove the composer.lock and vendor/ and try again ** composer.lock
Matthew
MatthewOP2y ago
It is a test project. However, this is my 4th attempt and I still cant manage to run it
Matthew
MatthewOP2y ago
This is what I have after running your command:
Patrick Boivin
I see you're still on v3.0.0-alpha67, we need to solve that first
Matthew
MatthewOP2y ago
and how can we do that? Probably because of Livewire Thats why I tried installing beta 3
Patrick Boivin
Did you remove livewire/livewire from your composer.json?
Matthew
MatthewOP2y ago
I did
Patrick Boivin
composer update -W filament/filament
Matthew
MatthewOP2y ago
and after?
Patrick Boivin
php artisan about
Matthew
MatthewOP2y ago
Same
Patrick Boivin
Yeah that's weird... did you try deleting composer.lock and vendor/ ?
Matthew
MatthewOP2y ago
I will try it now Still alpha
Patrick Boivin
This could be your composer cache on the virtual machine, I'm not sure at this point...
Matthew
MatthewOP2y ago
Maybe its too much to ask, but do you mind joining a voice chat? Maybe it would be easier to solve that way
Patrick Boivin
Can't do voice chat atm, but it's ok to ask 👍
Matthew
MatthewOP2y ago
oke, thanks foryour help I cleared the cache btw and still same error
Patrick Boivin
Do you have any way to try this outside of a virtual machine? Can you create a project and run composer commands locally?
Matthew
MatthewOP2y ago
I will try this on my native linux drive and let you know Im trying to host my own web server and run filament from there. Thats why I use the VM
Patrick Boivin
Makes perfect sense. I'm just curious to see if you can reproduce the issue outside of the VM.
Matthew
MatthewOP2y ago
I followed the same steps on my native linux and it works
Matthew
MatthewOP2y ago
Matthew
MatthewOP2y ago
I have no idea why the composer in the VM is tweaking
Patrick Boivin
Yeah, very weird... my best guess is still with your composer package cache, on the VM. It's probably stuck with some stale packages and composer update is not busting the cache.
Matthew
MatthewOP2y ago
@pxlrbt Maybe you have an idea? I tried clearing the cache but no luck
Dennis Koch
Dennis Koch2y ago
Not really sorry.
Chris
Chris2y ago
rm -rf ~/.composer/cache/* En and maybe composer require filament/filament:3.0.0

Did you find this page helpful?