statamic / ssg

The official Statamic Static Site Generator
229 stars 23 forks source link

Generation fails with "Unresolvable dependency resolving" error #153

Closed anthonynelzinsantos closed 8 months ago

anthonynelzinsantos commented 8 months ago

Hi,

since upgrading to Statamic 4.28.0 and SSG 2.2.0 with PHP 8.2.11, our static site generation pipeline has been broken. Using the php please ssg:generate command results in the following error:

In Container.php line 1118:
Unresolvable dependency resolving [Parameter #1 [ <required> $customStubPath ]] in class Illuminate\Database\Migrations\MigrationCreator

Removing the offending class in the Laravel framework allows for the generation, but isn’t a viable "solution".

jasonvarga commented 8 months ago

Can you show your config/app.php file?

I suspect maybe you don't have the the providers set up correctly. Maybe something incorrect with the upgrade?

You should see something like this:

https://github.com/statamic/statamic/blob/f811c5b3e79a05882020e9e2cc266f746ca0793e/config/app.php#L158-L171

anthonynelzinsantos commented 8 months ago

Hi Jason,

sorry for the delay. I don’t think we’ve touched this file since we first set the site up, but here you go:

app.txt

jasonvarga commented 8 months ago

Looks fine. Can you try another composer update?

anthonynelzinsantos commented 8 months ago

Good call. I nuked my composer.json file that dates back from Statamic 3 to adhere to the current one… and everything worked on the first try. It lacked some Laravel packages (Sanctum, Pint, Sail). Thank you very much!

jasonvarga commented 8 months ago

Beautiful!