Inertia

Been working with laravel and react with inertia. Works great on a local environment. However, as soon as the site is sent to production, some issues are present. either the page is completely blank with no errors or the style sheets don’t load among a few others issues. i have tried searching for the issue and have spent lots of time trying to work it out. The problem can be something very simple or maybe not? there are conflicting results online about only using a vps when working with inertia/react front end since it requires npm, but others say using npm build locally then pushing to production on shared hosting will work without any other setup. is there any way a tutorial can be made to show if or how this is possible to successfully deploy on hosting? I currently use shard hosting. thanks.
2 Replies
tuto1902
tuto19022mo ago
I would probably go with the "compile locally" route to avoid dealing with npm in production. I'm quite new to laravel with react and inertia myself so I don't have much insight on how to deploy. I'll probably find out how difficult it is once the Friday stream project reaches the deploy stage.
.1113953
.1113953OP2mo ago
nice. thanks. i figured out the issue with the front-end not loading. apparently the public/build folder is ignored in the git ignore file. since not everyone uses a front end framework, it is ignored by default in laravel. the issue now is running php artisan storage:link isn’t working. people say it’s a shared hosting issue that requires permissions but i haven’t yet figured it out.
Want results from more Discord servers?
Add your server