By nj167252
I have just deployed my SPA to a server. I used laravel with vue frontend scaffolding. Now the app is online and if I go to the domain I see it (but it’s not working correctly). However, I did not run npm run production before I deployed to the server.
Should I have run npm run production before I deployed?
Is it too late to do it now?
Should I do it on the server or should I do it only local device and then push?
Is npm run production even necessary for a a laravel app with vue frontend?
I currently do not have node on the server. The server is setup as a LEMP stack (Linux, Nginx, MySQL, PHP 7.3).
Thanks in advance.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
No, node.js is not required in your cases.
I am agreeing with bobby because you just need to upload required files on the server with package.json file and then install the node packages using npm install and then create a production version of code using npm run production and your project should be working.
Please careful with environment files because it consists of sensitive data. Otherwise, you are good to go.
Hi there @nj167252,
Node should not really be required in this case. What is the exact error that you get?
I would recommend running npm run production after the deployment, this should build your JS files.
Regards, Bobby
HI nj167252. It looks you deployed a laravel vue project with git. I am new to everything. Please recommend me any tutorials or resorces.
Thank YOU!
Regards ynav
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.