Roots Discourse

Sage 9 w Tailwind. Autoloader not found

Hi all.
I had a theme up and running on my local Valet install. I uploaded it (via ftp) to a test server and all was fine.
I’ve now gone back to the dev theme after a couple of months and have made changes on the local site, however I now get the “Autoloader not found.” message. I downloaded the working one from my test site to local, but it gives the same error message.
Is there something I need to do if I move it to a different URL or any other help?
I have run ‘composer install’, yarn build etc but it makes no difference.
Is there a way to debug this?

Have you installed/copied the theme runtime?
composer install in theme directory

Hi Strarsis,
yes i did.

(just to bulk out my reply for the forum)

composer dump-autoload

Is this on a shared host? Do you have shell access?

its just on my local dev environment. Laravel Valet on mac.
I ran
➜ mytheme composer dump-autoload
Generating autoload files
Carbon 1 is deprecated, see how to migrate to Carbon 2.
You can run ‘./vendor/bin/upgrade-carbon’ to get help in updating carbon and other frameworks and libraries that depend on it.
Generated autoload files

I don’t get any errors but i still get the same ‘autoloader not found’ if I activate the theme

Can you post the actual text of the error?

Sage › Error

Autoloader not found.

You must run composer install from the Sage directory.

Does the autoloader file exist after running dump-autoload? Should be at [themename]/vendor/autoload.php.



// autoload.php @generated by Composer

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit9266fce68150e2d024e8cab3c66e7b0b::getLoader();

What do your system logs say? This is starting to sound like a potential permissions error or something. The conditional to check for the autoloader is very simple: If the file exists, you shouldn’t get this error. You might stick a var_dump($composer); die(); or something in there to see where the script thinks the autoloader is.

Thanks for help everyone.
OK worked out what my mistake was… so for reference…
I had added a style.css and an index.php because I am uploading to a shared server.
At one point I randomly thought I needed to have a functions.php, so I think it must have been there for a bit before I did a yarn:build.
this then caused the problem.
So deleted that and all good.

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