Roots Discourse

[Sage 10] Not compiling/building for production - error

I’ve build a theme, and it seems it works well on localhost.

I’ve tried to upload it, and it breaks.

The commands I used: npm run-script build:production

After that, I’ve uploaded all files, except node_modules.

And I get this error: There has been a critical error on this website.

I also emptied the index and page files, to be blank, in case there was an error in my code on build time, but that didn’t seem to have any effect.

I’m using cPanel, Apache as the server, PHP version 7.4.

The logs say(100last lines out of 2000):

I have no idea what to do. I’ve tried everything I could possibly think.

What should I do?

Looks like an error with the Composer autoloader. Not sure why you’d get an error if you’re uploading all your files as is, but maybe you’ve got a case issue with file names…? That remote server is on Linux, so it’s case-sensitive, so if your local isn’t then your autoloader may be pointing to the wrong files.

1 Like

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