Acorn has been removed as a dependency in Sage’s composer.json. We recommend installing Acorn from Bedrock’s composer.json, or as a mu-plugin in non-Bedrock environments. Acorn is still required in order to use Sage, and Sage will exit immediately with an error if Acorn isn’t available. We’ve also removed the config and bootstrap directories from Sage, and default to a zero-config setup.
Bud has shipped several releases since being included in beta 2, in which many bug fixes, performance improvements, and developer experience improvements have landed.
Sage has moved the global editor settings from setup.php into theme.json and now requires WordPress 5.9+.
Changes
migrate global settings to theme.json (#2964) @retlehs
I support the decision to remove acorn from the theme directory, it significantly reduces the number of files in the vendor directory, streamlining the initial deployments for non bedrock users.
Having said that, I’m not having much luck installing acorn with either the original approach or the alternatives in the documentation.
Including acorn by running composer require roots/acorn within the sage directory leads to the following error.
Fatal error: Uncaught Roots\Acorn\Assets\Contracts\ManifestNotFoundException: The manifest [/Users/*/Local Sites/*/app/public/wp-content/themes/*/public/manifest.json] cannot be found. in /Users/*/Local Sites/*/app/public/wp-content/themes/*/vendor/roots/acorn/src/Roots/Acorn/Assets/Manager.php on line 133
Adding acorn to the mu-plugins directory doesn’t make the error below disappear and adding it to the plugins directory requires it to be activated, but the admin is blocked with the same error below.
You need to install Acorn to use this theme.
What am I missing in order to add acorn correctly without bedrock?
I can confirm that including acorn by running composer require roots/acorn within the sage directory still works like in previous versions, @SergiArias.
I just needed to run bud build to resolve the error about the missing manifest.json file.
Not sure if it’s also recommended to add the post-autoload-dump script back to composer.json.
I’m still interested to understand how to install acorn as a plugin instead, if anyone can point me in the right direction.
I installed it as a plugin and it works flawlessly after bud build. Did you try to activate it through wp-cli? Just run in the terminal: wp plugin activate acorn
To install it as a mu-plugin, we must autoload it, as must use plugins aren’t activated by default if they are within folders; just create a acorn-load.php file inside mu-plugins folder and inside it:
I have another question. How bud.config.js proxy should be setup? https or http? Should we create a local certificate if using https? Sometimes the browser cannot stay on localhost:3000 and goes directly into the proxy, losing the live reload, but I don’t quite follow why.
@SergiArias can you please create individual topics for each separate issue that you’re seeking support for? This is the release announcement for Sage 10.0.0-beta.3, and you’ve got specific questions about Bud, Acorn, and packages that aren’t from the Roots namespace