You don't need NodeJS on a production server for that. Have you pushed your generated js file to the server?
Deploy Vue JS app with laravel back-end
Hi people,
I recently started to learn Vue JS, and I created a little reply system with laravel for the back-end. That's working locally, I created my laravel app, I installed node JS, went npm run watch and it's fine. But I'd like to put it in my server.
Usually, with only Laravel app, it's working, I can create the project, put the files and eveything works fine. But now I have some vue components, and I don't know what to do on my server.
Actually I created my laravel App on the server, didn't installed Node yet, I put my files on the project, the vue components are in the resources/js/components folder, when I go on my URL, I only have the welcome Laravel page, even if the welcome.blade.php file is modified and have all my components inside.
Should I install NodeJS ? Something else on my server for making it works ?
Since I'm still beginning, I'm a bit afraid to install too many things on my server that I should not do, and I don't really understands all the tutorials I found on the web.
If you can help me getting my app working, I thank you in advance !
I assume that you have a standard laravel 6.x setup in place with webpack, right?
So, when you run npm run watch webpack compiles all your js stuff to one single app.js (depends on your config), which is located under 'public/js/'. This file is loaded by your application to run all that VueJs stuff. So you need this 'public/js/app.js' file on your server.
Please or to participate in this conversation.