Roots Discourse

Acorn error

Hello,

I am using Sage 10.0.0-beta.2 and I have the following error (when deploying on a production server):

> Roots\Acorn\ComposerScripts::postAutoloadDump
Script Roots\Acorn\ComposerScripts::postAutoloadDump handling the post-autoload-dump event terminated with an exception


  [ErrorException]
  Array to string conversion

And the PHP version is 7.4.25. Has someone an idea about this error?
Best Regards,

Are you using the latest Sage 10 commit?
Have you updated the Sage 10 composer dependencies (theme, not Bedrock!) (composer update)?

I’m not using the latest Sage 10 commit: how can I configure that in my composer.json?

What version of Acorn?

Yes, the point is that the Sage 10 commit and the acorn version used by it could be the cause of compatibility issues.

I am using the following:

"roots/acorn": "v2.0.0-beta.7"

And what Bedrock release are you using?

According to the CHANGELOG.md file, version 1.18.0.

The roots/acorn package version you are currently using was set 15 days ago to version v2.0.0-beta.7 (sage/composer.json at 4281ffff902e19cf368014634abaa9895a9544f6 · roots/sage · GitHub) for the Sage 10 branch.
So there is indeed a chance that the Sage 10 commit you are using is not compatible with that latest roots/acorn release.
Try to downgrade fromv2.0.0-beta.6 tov2.0.0-beta0 (see the release version list roots/acorn - Packagist) and check each time whether the theme loads without fatal errors.

Thank you @strarsis, it worked by downgrading to v2.0.0-beta.6!

Did the exception throw where the error is happening? Not sure if it wasn’t verbose or if you cut it out of your original paste.