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.

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

                              
  [ErrorException]            
  Array to string conversion  


Exception trace:
 () at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/process/Process.php:263
 Composer\Util\ErrorHandler::handle() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/process/Process.php:263
 Symfony\Component\Process\Process->start() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/process/Process.php:196
 Symfony\Component\Process\Process->run() at C:\laragon\www\app\web\app\themes\mnm\vendor\roots\acorn\src\Roots\Acorn\Console\Console.php:109
 Roots\Acorn\Console\Console->acorn() at C:\laragon\www\app\web\app\themes\mnm\vendor\roots\acorn\src\Roots\Acorn\Console\Console.php:36
 Roots\Acorn\Console\Console->configClear() at C:\laragon\www\app\web\app\themes\mnm\vendor\roots\acorn\src\Roots\Acorn\ComposerScripts.php:20
 Roots\Acorn\ComposerScripts::clearCompiled() at C:\laragon\www\app\web\app\themes\mnm\vendor\roots\acorn\src\Illuminate\Foundation\ComposerScripts.php:45
 Illuminate\Foundation\ComposerScripts::postAutoloadDump() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:389
 Composer\EventDispatcher\EventDispatcher->executeEventPhpScript() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:238        
 Composer\EventDispatcher\EventDispatcher->doDispatch() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:119
 Composer\EventDispatcher\EventDispatcher->dispatchScript() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Autoload/AutoloadGenerator.php:426
 Composer\Autoload\AutoloadGenerator->dump() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Installer.php:341
 Composer\Installer->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/InstallCommand.php:139
 Composer\Command\InstallCommand->execute() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Command/Command.php:245
 Symfony\Component\Console\Command\Command->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:835
 Symfony\Component\Console\Application->doRunCommand() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:185
 Symfony\Component\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:336
 Composer\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:117
 Symfony\Component\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:131
 Composer\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/bin/composer:83
 require() at C:\ProgramData\ComposerSetup\bin\composer.phar:29

here are the errors with latest sage theme and latest acorn.

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

                              
  [ErrorException]            
  Array to string conversion  


Exception trace:
 () at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/process/Process.php:263
 Composer\Util\ErrorHandler::handle() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/process/Process.php:263
 Symfony\Component\Process\Process->start() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/process/Process.php:196
 Symfony\Component\Process\Process->run() at C:\laragon\www\app\web\app\themes\mnm\vendor\roots\acorn\src\Roots\Acorn\Console\Console.php:109
 Roots\Acorn\Console\Console->acorn() at C:\laragon\www\app\web\app\themes\mnm\vendor\roots\acorn\src\Roots\Acorn\Console\Console.php:36
 Roots\Acorn\Console\Console->configClear() at C:\laragon\www\app\web\app\themes\mnm\vendor\roots\acorn\src\Roots\Acorn\ComposerScripts.php:20
 Roots\Acorn\ComposerScripts::clearCompiled() at C:\laragon\www\app\web\app\themes\mnm\vendor\roots\acorn\src\Illuminate\Foundation\ComposerScripts.php:45
 Illuminate\Foundation\ComposerScripts::postAutoloadDump() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:389
 Composer\EventDispatcher\EventDispatcher->executeEventPhpScript() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:238        
 Composer\EventDispatcher\EventDispatcher->doDispatch() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:119
 Composer\EventDispatcher\EventDispatcher->dispatchScript() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Autoload/AutoloadGenerator.php:426
 Composer\Autoload\AutoloadGenerator->dump() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Installer.php:341
 Composer\Installer->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/InstallCommand.php:139
 Composer\Command\InstallCommand->execute() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Command/Command.php:245
 Symfony\Component\Console\Command\Command->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:835
 Symfony\Component\Console\Application->doRunCommand() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:185
 Symfony\Component\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:336
 Composer\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Application.php:117
 Symfony\Component\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:131
 Composer\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/bin/composer:83
 require() at C:\ProgramData\ComposerSetup\bin\composer.phar:29

here are the errors with latest sage theme and latest acorn.

@juslintek
install yarn add root/acorn^2.1
and rebuild