Roots Discourse

Sage 10 "Acorn" issue?

I don’t even know where to begin. I’ve been diving into Sage10 lately and so far everything has been wonderful. A couple hours ago out of nowhere I start seeing this:

I don’t know where to turn. I was just building a theme and then this happened. I don’t understand what any of this means.

I did completely remove my vendors folder, cleared composer cache and updated composer.

Here’s my composer file. It’s been the same for a few weeks. I haven’t made any changes to it.

{
  "name": "roots/sage",
  "type": "wordpress-theme",
  "license": "MIT",
  "description": "WordPress starter theme with a modern development workflow",
  "homepage": "https://roots.io/sage/",
  "authors": [
    {
      "name": "Ben Word",
      "email": "ben@benword.com",
      "homepage": "https://github.com/retlehs"
    },
    {
      "name": "Scott Walkinshaw",
      "email": "scott.walkinshaw@gmail.com",
      "homepage": "https://github.com/swalkinshaw"
    },
    {
      "name": "QWp6t",
      "email": "hi@qwp6t.me",
      "homepage": "https://github.com/qwp6t"
    },
    {
      "name": "Brandon Nifong",
      "email": "brandon@tendency.me",
      "homepage": "https://github.com/log1x"
    }
  ],
  "keywords": [
    "wordpress"
  ],
  "support": {
    "issues": "https://github.com/roots/sage/issues",
    "forum": "https://discourse.roots.io/"
  },
  "autoload": {
    "psr-4": {
      "App\\": "app/"
    }
  },
  "require": {
    "php": "^7.3|^8.0",
    "log1x/crumb": "^1.0",
    "log1x/navi": "^2.0",
    "log1x/pagi": "^1.0",
    "log1x/poet": "^2.0",
    "log1x/sage-directives": "^1.1",
    "log1x/sage-html-forms": "^1.0",
    "mwdelaney/sage-advanced-custom-fields": "^1.6",
    "roots/acorn": "dev-main"
  },
  "require-dev": {
    "filp/whoops": "^2.9",
    "squizlabs/php_codesniffer": "^3.5"
  },
  "suggest": {
    "log1x/sage-directives": "A collection of useful Blade directives for WordPress and Sage (^1.0).",
    "log1x/sage-svg": "A useful SVG directive for inlining SVG's within Blade views (^1.0)."
  },
  "config": {
    "optimize-autoloader": true,
    "preferred-install": "dist",
    "sort-packages": true
  },
  "minimum-stability": "dev",
  "prefer-stable": true,
  "scripts": {
    "lint": [
      "phpcs --extensions=php --standard=PSR12 app config"
    ],
    "post-autoload-dump": [
      "Roots\\Acorn\\ComposerScripts::postAutoloadDump"
    ]
  }
}

In my terminal I am seeing this now after running composer:

> Roots\Acorn\ComposerScripts::postAutoloadDump

What else could I provide that would be helpful?

This is the only other topic that appears to be what I may be experiencing:

https://discourse.roots.io/t/install-theme-based-on-sage-through-composer-makes-post-autoload-dump-not-running/18250/2

I installed a fresh version of Sage10 and I see the following in my terminal but the theme appears to be loading fine. I have no idea what I could have done to mess it up. I wouldn’t mind knowing what could have caused it. Meanwhile I may have to transfer files over to a fresh install.

composer create-project roots/sage my-theme-name dev-10.0.0-dev

roots/sage suggests installing log1x/sage-directives (A collection of useful Blade directives for WordPress and Sage (^1.0).)
roots/sage suggests installing log1x/sage-svg (Provides a useful SVG directive for properly inlining SVG's within your Blade views (^1.0).)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing elasticsearch/elasticsearch (Allow sending log messages to an Elasticsearch server via official client)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongodb (Allow sending log messages to a MongoDB server (via driver))
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server (via library))
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
symfony/translation suggests installing symfony/config
symfony/translation suggests installing symfony/yaml
symfony/var-dumper suggests installing ext-intl (To show region name in time zone dump)
league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2)
league/flysystem suggests installing league/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3)
league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage)
league/flysystem suggests installing league/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching)
league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem)
league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files)
league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib)
league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage)
league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter)
league/flysystem suggests installing spatie/flysystem-dropbox (Allows you to use Dropbox storage)
league/flysystem suggests installing srmklive/flysystem-dropbox-v2 (Allows you to use Dropbox storage for PHP 5 applications)
voku/portable-ascii suggests installing ext-intl (Use Intl for transliterator_transliterate() support)
illuminate/support suggests installing moontoast/math (Required to use ordered UUIDs (^1.1).)
illuminate/support suggests installing ramsey/uuid (Required to use Str::uuid() (^3.7|^4.0).)
illuminate/support suggests installing vlucas/phpdotenv (Required to use the Env class and env helper (^4.0).)
illuminate/filesystem suggests installing illuminate/http (Required for handling uploaded files (^7.0))
illuminate/filesystem suggests installing league/flysystem-aws-s3-v3 (Required to use the Flysystem S3 driver (^1.0).)
illuminate/filesystem suggests installing league/flysystem-cached-adapter (Required to use the Flysystem cache (^1.0).)
illuminate/filesystem suggests installing league/flysystem-sftp (Required to use the Flysystem SFTP driver (^1.0).)
illuminate/filesystem suggests installing psr/http-message (Required to allow Storage::put to accept a StreamInterface (^1.0))
symfony/service-contracts suggests installing symfony/service-implementation
symfony/console suggests installing symfony/event-dispatcher
symfony/console suggests installing symfony/lock
illuminate/console suggests installing dragonmantank/cron-expression (Required to use scheduler (^2.0).)
illuminate/console suggests installing guzzlehttp/guzzle (Required to use the ping methods on schedules (^6.3.1|^7.0).)
illuminate/console suggests installing illuminate/bus (Required to use the scheduled job dispatcher (^7.0))
illuminate/console suggests installing illuminate/queue (Required to use closures for scheduled jobs (^7.0))
illuminate/cache suggests installing ext-memcached (Required to use the memcache cache driver.)
illuminate/cache suggests installing illuminate/database (Required to use the database cache driver (^7.0).)
illuminate/cache suggests installing illuminate/redis (Required to use the redis cache driver (^7.0).)
illuminate/cache suggests installing symfony/cache (Required to PSR-6 cache bridge (^5.0).)
filp/whoops suggests installing whoops/soap (Formats errors as SOAP responses)

Related / same issue:

I have exactly the same issue.

Everything worked fine untill i updated my composer. I think it has something to do with an Roots\Acorn update.

It’s because in your composer.json file it requires "roots/acorn": "dev-main" which will resolve to the new version ‘v2.0.0-alpha.0’ which changed these config files https://github.com/roots/acorn/commit/eb238de53431d300b567a295962170831581b43c#diff-de313c6f4e384cdf3ddb302c6507a70a855df166d0c4520178c3a32e45ef60e1L34-L41 and it thinks your config/assets.php has a key ‘url’ in the array while probarely it has ‘uri’ there.

This commit adds theme support for the new acorn version:

I changed this in my project and everything seems to work right know.

2 Likes

Yeah! That fixed it.

What I’ve did:

  1. config/view.php
    comment out ‘asset’ like this:
'directives' => [
        // 'asset'  => Roots\Acorn\Assets\AssetDirective::class,
    ],
  1. config/assets.php
    change the ‘theme’ array to the following:
'theme' => [
            'path' => get_theme_file_path('public'),
            'url' => get_theme_file_uri('public'),
            'assets' => public_path('mix-manifest.json'),
        ]

and on top of the file add the use function:

<?php
use function Roots\public_path;
  1. change your composer.json file to:
"roots/acorn": "2.0.0-alpha.0",

(maybe 4) remove composer.lock, remove vendor folder and install composer packages again

2 Likes

@joshb ping :wink: hope you get the notification and hopefully this works for you

1 Like

@kvnblckdsk, so far it appears to be working! Thanks.

This topic was automatically closed after 42 days. New replies are no longer allowed.