'Laravel + Vue js Deploying on Shared hosting

I have a Laravel project that already deployed on shared hosting server but now I just want to add Vue.js component to that project.

Problem is when I was deploying project I didn't install the npm. Can anyone advise me how to fix this thing. I used Laravel 5.8

How can I add Vue component to this project ?



Solution 1:[1]

you can't run npm commands in sharing hosting .

you can run npm run production in local and share mixed file on sharing hosting

Solution 2:[2]

Usually shared hosting does not provide enough shell commands. So you would need to run npm run production on your local computer.

As a reminder, it is not recommedable to host Laravel website on a shared host. You may need to do extra work to make your Laravel website work such as changing document root of your laravel project.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Reza ghz
Solution 2 Elvis