F
Filament17mo ago
Matthew

every php artisan command throws error

This error popped up while upgrading from v2 to v3
35 Replies
Dennis Koch
Dennis Koch17mo ago
You are very likely on Livewire v2 and Filament v3-alpha. Please check your composer.json.
Matthew
MatthewOP17mo 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 Koch17mo ago
You need minimum-stability dev and LW3
Matthew
MatthewOP17mo ago
I cant upgrade with minimum stability dev In short i need minimum stability dev for BOTH filament v3 and livewire v3?
Matthew
MatthewOP17mo ago
Matthew
MatthewOP17mo ago
I installed livewire v3 and now I get this when installing filament v3 (Fresh project)
Patrick Boivin
Patrick Boivin17mo ago
Can you share your composer.json?
Matthew
MatthewOP17mo 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
Patrick Boivin17mo ago
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
MatthewOP17mo ago
It is a test project. However, this is my 4th attempt and I still cant manage to run it
Matthew
MatthewOP17mo ago
This is what I have after running your command:
Patrick Boivin
Patrick Boivin17mo ago
I see you're still on v3.0.0-alpha67, we need to solve that first
Matthew
MatthewOP17mo ago
and how can we do that? Probably because of Livewire Thats why I tried installing beta 3
Patrick Boivin
Patrick Boivin17mo ago
Did you remove livewire/livewire from your composer.json?
Matthew
MatthewOP17mo ago
I did
Patrick Boivin
Patrick Boivin17mo ago
composer update -W filament/filament
Matthew
MatthewOP17mo ago
and after?
Patrick Boivin
Patrick Boivin17mo ago
php artisan about
Matthew
MatthewOP17mo ago
Same
Patrick Boivin
Patrick Boivin17mo ago
Yeah that's weird... did you try deleting composer.lock and vendor/ ?
Matthew
MatthewOP17mo ago
I will try it now Still alpha
Patrick Boivin
Patrick Boivin17mo ago
This could be your composer cache on the virtual machine, I'm not sure at this point...
Matthew
MatthewOP17mo 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
Patrick Boivin17mo ago
Can't do voice chat atm, but it's ok to ask 👍
Matthew
MatthewOP17mo ago
oke, thanks foryour help I cleared the cache btw and still same error
Patrick Boivin
Patrick Boivin17mo ago
Do you have any way to try this outside of a virtual machine? Can you create a project and run composer commands locally?
Matthew
MatthewOP17mo 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
Patrick Boivin17mo ago
Makes perfect sense. I'm just curious to see if you can reproduce the issue outside of the VM.
Matthew
MatthewOP17mo ago
I followed the same steps on my native linux and it works
Matthew
MatthewOP17mo ago
Matthew
MatthewOP17mo ago
I have no idea why the composer in the VM is tweaking
Patrick Boivin
Patrick Boivin17mo ago
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
MatthewOP17mo ago
@pxlrbt Maybe you have an idea? I tried clearing the cache but no luck
Dennis Koch
Dennis Koch17mo ago
Not really sorry.
Chris
Chris17mo ago
rm -rf ~/.composer/cache/* En and maybe composer require filament/filament:3.0.0
Want results from more Discord servers?
Add your server