Sage 9 errors on live server. View [partials.page-header] not found

Hello,

Sage 9 is working fine on my local machine, but when i upload it to my deployment server on Flywheel using DeployHQ from GitLab, im getting errors. Im not using Bedrock or Trellis, just pushing my files using yarn build:production.

There might be two problems at play here, the first problem i was getting was when i pushed my project live, i got sage telling me that composer needed to be installed. the fix for this i believe was to include /vendor.

https://discourse.roots.io/t/is-sage-9-wp-engine-possible-without-composer/8144

ive also seen that i need to include node_modules, please tell me i dont have to do this (i hope this is incorrect, DeployHQ times out because it takes so long)

https://discourse.roots.io/t/help-sage-autoloader-errors-after-activating-theme-after-seemingly-successful-deploy/9991

The Error:

Fatal error: Uncaught InvalidArgumentException: View [partials.page-header] not found. in /www/wp-content/themes/ndinawe/vendor/illuminate/view/FileViewFinder.php:137   
Stack trace: #0 /www/wp-content/themes/ndinawe/vendor/illuminate/view/FileViewFinder.php(79): Illuminate\View\FileViewFinder->findInPaths('partials.page-h...', Array)
#1 /www/wp-content/themes/ndinawe/vendor/illuminate/view/Factory.php(128): Illuminate\View\FileViewFinder->find('partials.page-h...')
#2 /www/wp-content/uploads/cache/2e4d34c8106dd8d0d1496dd71b505ff5d3792f47.php(2): Illuminate\View\Factory->make('partials.page-h...', Array) 
#3 /www/wp-content/themes/ndinawe/vendor/illuminate/view/Engines/PhpEngine.php(42): include('/www/wp-content...')
#4 /www/wp-content/themes/ndinawe/vendor/illuminate/view/Engines/CompilerEngine.php(59): Illuminate\View\Engines\PhpEngine->evaluatePath('/www/wp-content...', Array)
#5 /www/wp-content/themes/ndinawe/vendor/illuminate/view/View.php(137): Illuminate\View\Engines\CompilerEngine->get('/www/wp-content...', Array)
#6 in /www/wp-content/themes/ndinawe/vendor/illuminate/view/FileViewFinder.php on line 137

Ive also seen some odd links here and there touching on this subject, but they didnt seem to apply to this situation, or using Sage, without adjusting the directories.

I’m definitely a beginner when it comes to troubleshooting these things, any resources, comments, points in the right direction, i would appreciate greatly.

Thanks,

–Dave

vendor needs to be included—it contains PHP packages installed by composer that your site needs to function.

node_modules does not need to be included—it contains JavaScript packages installed by Yarn, but these packages are either only needed in development (i.e. webpack, browsersync), or are bundled up into dist when you run yarn build. In either event, you should not be pushing node_modules to your server.

So far as the error you’re seeing about not finding partials: I’m not sure exactly what might be causing it, but my first debug step w/ Flywheel would be to upload your theme directly via SFTP (not using DeployHQ). If that works, then the problem is with your DeployHQ workflow. If it doesn’t, then the problem is somewhere else.

We have a number of Sage sites on Flywheel right now, though, and they didn’t need any special configuration, so I can confirm that Sage sites do run fine on their platform.

embarrassing, but ill put my solution here in case someone else has a face-palming moment.

the problem was as simple as the error made is sound, i must have deleted page-header.blade.php in /partials

this wasn’t a problem on my local machine, because i wasn’t calling that partial on the views i was developing, but when you upload your site, it defaulted to index.blade.php which had @include('partials.page-header')

thank you for the suggestion, and the confirmation on only having to upload /vendor