Question

Error when deploying Node Js and Vue js application

Hello, I need help with this error, I have tried to upload this application a few days ago, I have investigated and tried to perform the survey but I can not find the reason, I have little experience with these tools and I need to upload this project to a service like digital ocean has:

The repository is the following: https://github.com/AlexAntonioG/baevi-site

console.log(" baevi-site@1.0.0 build
[2023-11-28 05:21:52] > cross-env NODE_ENV=production webpack --progress --hide-modules
[2023-11-28 05:21:52] 
[2023-11-28 05:21:57]  15% building modules 42/55 mod 19% building modules 81/111 mo 25% building modules 129/2023- 30% build2023-11-28T05:22:01.1 37% building modules 225/247 m 42023-11-28T05:22:26.388938892Z Hash: 7913dd8261056402892c/axios/lib/cancel/isCancel.js
[2023-11-28 05:22:26] Version: webpack 3.12.0
[2023-11-28 05:22:26] Time: 32397ms
[2023-11-28 05:22:26]                                               Asset     Size  Chunks                    Chunk Names
[2023-11-28 05:22:26]            bg4.jpg?b50ec0d45ed3be7f47e5c648a9ced241   145 kB          [emitted]         
[2023-11-28 05:22:26]          baevi.png?05ef3d07ba5dded57cf70a90aa61154e   194 kB          [emitted]         
[2023-11-28 05:22:26]          fact4.png?43d271ac3d60486cb436204b738aa92d  3.76 kB          [emitted]         
[2023-11-28 05:22:26]  service-icon2.png?69edbf313d9cb235404495fae432ca01  3.65 kB          [emitted]         
[2023-11-28 05:22:26]  service-icon3.png?e18f15899ebc72414092b816d2d1736c     4 kB          [emitted]         
[2023-11-28 05:22:26]  service-icon1.png?1f84489d40354db5e558b7dc0a64a3b7  3.23 kB          [emitted]         
[2023-11-28 05:22:26]          fact3.png?4aaa8aee9db87291b60d969b334452c9  2.63 kB          [emitted]         
[2023-11-28 05:22:26]            bg5.jpg?804f9c7b1570bacc2bdde630edef67f8   121 kB          [emitted]         
[2023-11-28 05:22:26]            bg1.jpg?f73b2b0dc5960cf4912d63ad58143635   289 kB          [emitted]  [big]  
[2023-11-28 05:22:26]             bg.jpg?804293a81cc3197f9ced71ea410700c3   194 kB          [emitted]         
[2023-11-28 05:22:26]        banner2.jpg?f885a0dbab8c59311cbc365cac6c87bd   210 kB          [emitted]         
[2023-11-28 05:22:26]    slide-page3.jpg?66d5835f5c48f935b9c0c58138800f0e   180 kB          [emitted]         
[2023-11-28 05:22:26]    slide-page4.jpg?8b4ee026018efc1401226c8e94c48a17   477 kB          [emitted]  [big]  
[2023-11-28 05:22:26] service-center.jpg?794ef31b83b2133551a3d3fc2d4fabcf  53.7 kB          [emitted]         
[2023-11-28 05:22:26]  service-icon4.png?1120fc8f71f76e42c4a16228755c7696  3.28 kB          [emitted]         
[2023-11-28 05:22:26]       project1.jpg?6880dc7254be2264e991b7b34360eb23   207 kB          [emitted]         
[2023-11-28 05:22:26]       project2.jpg?acd1debaa96f18c192b9376fc9285cbc   237 kB          [emitted]         
[2023-11-28 05:22:26]       project3.jpg?6636c728ed8e8869be048e59dcecd774   264 kB          [emitted]  [big]  
[2023-11-28 05:22:26]       project4.jpg?b4f345807012eaa70e86b789b920c723   342 kB          [emitted]  [big]  
[2023-11-28 05:22:26]       project5.jpg?648bd7a6a7d0a1a995a8720bbc296b4d   134 kB          [emitted]         
[2023-11-28 05:22:26]       project6.jpg?432a693797ae3b6ad83c991686cb74c1   192 kB          [emitted]         
[2023-11-28 05:22:26]          news1.jpg?ef727f467176148fc8c64819ae101546   134 kB          [emitted]         
[2023-11-28 05:22:26]          news2.jpg?a422b03b7d56e230cc44b20e067ace88   156 kB          [emitted]         
[2023-11-28 05:22:26]          news3.jpg?6421eaf7ef543a09b79e12566a9381af   154 kB          [emitted]         
[2023-11-28 05:22:26]          fact1.png?c4fb7997bf01e728803c136738fb1612  2.81 kB          [emitted]         
[2023-11-28 05:22:26]          fact2.png?30ad417e780e02e9094b7ddfe240d604  1.86 kB          [emitted]         
[2023-11-28 05:22:26]   testimonial1.png?5a00caacbdcfb0d9311a536621a5db87   126 kB          [emitted]         
[2023-11-28 05:22:26]   testimonial2.png?56b155519b7d43a2ae2457ea7eeb783e    73 kB          [emitted]         
[2023-11-28 05:22:26]   testimonial3.png?41deae3cad042a701bc52fbfc4220092  35.4 kB          [emitted]         
[2023-11-28 05:22:26]        client1.png?e1cafa858e4c92b192b11edc9571ac33   183 kB          [emitted]         
[2023-11-28 05:22:26]        client2.png?b60aa54dcf2874cd89b19d94ba0fd3a7    82 kB          [emitted]         
[2023-11-28 05:22:26]        client3.png?483cd5da29e3158b46595977cc765d20    66 kB          [emitted]         
[2023-11-28 05:22:26]        client4.png?6e4cecfa28da9c46d41fde985498e5fc   251 kB          [emitted]  [big]  
[2023-11-28 05:22:26]        client5.png?2d50b964b6876d256cbf3f129f8f5ccb   215 kB          [emitted]         
[2023-11-28 05:22:26]        client6.png?42f3be0b50cf7908549d01287120e50d  82.4 kB          [emitted]         
[2023-11-28 05:22:26]        client7.png?8c0ed02929303c1bf91a0054953d2eb9   160 kB          [emitted]         
[2023-11-28 05:22:26]        client8.png?bac6ca1a9bd8451eb2c64d761d751ab6   175 kB          [emitted]         
[2023-11-28 05:22:26]        client9.png?4e224bc926912b8c1ee34d410f0e402c   231 kB          [emitted]         
[2023-11-28 05:22:26]       service1.jpg?7736540fee500dd6197286ca8ae8f87b   163 kB          [emitted]         
[2023-11-28 05:22:26]       service2.jpg?58a3c8b346dfc428ea39886a7d433747  72.8 kB          [emitted]         
[2023-11-28 05:22:26]       service3.jpg?607fb3fe71857105f78aabe9d234bda8   194 kB          [emitted]         
[2023-11-28 05:22:26]          team6.jpg?18101299ee308da73f848c95b9c84a55  28.2 kB          [emitted]         
[2023-11-28 05:22:26]          team5.jpg?642feee91e44367535e06118f65a3770   111 kB          [emitted]         
[2023-11-28 05:22:26]          team4.jpg?2cb0f25d3f3e91e74607eb9ab1cc1547  86.8 kB          [emitted]         
[2023-11-28 05:22:26]          team3.jpg?68a8946d0b821df6ccf7391699121453  71.3 kB          [emitted]         
[2023-11-28 05:22:26]          team1.jpg?c35b478e55b7e69a6c79beb37a9eb4d0   107 kB          [emitted]         
[2023-11-28 05:22:26]        website.png?3602a256c73366fbdf290d390d51a2c1  13.6 kB          [emitted]         
[2023-11-28 05:22:26]                                            build.js  1.19 MB       0  [emitted]  [big]  main
[2023-11-28 05:22:26]                                        build.js.map  7.58 MB       0  [emitted]         main
[2023-11-28 05:22:26npm notice                                                                              
[2023-11-28 05:22:26] npm notice New major version of npm available! 8.19.4 -> 10.2.4
[2023-11-28 05:22:26] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.4>
[2023-11-28 05:22:26] npm notice Run `npm install -g npm@10.2.4` to update!
[2023-11-28 05:22:26] npm notice 
[]
");

I’ve been making several changes and debugging certain situations such as the port, the startup commands and little by little I have advanced but this time I’m stuck and I don’t know why, I would appreciate your help :D


Submit an answer


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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
December 2, 2023

Hi there,

As this is a Vue app, there is no need to deploy it as a web service using the npm run dev development local server.

Instead you can deploy this as a static site which essentially first runs npm run build and then deploys only the compiled static assets. This is the recommended way for deploying static apps in production.

Here is an example on how to do this with a React app, but the procedure will be the exact same for Vue as well:

https://www.digitalocean.com/community/tutorials/how-to-deploy-a-react-application-to-digitalocean-app-platform

Hope that this helps and let me know if you have any questions!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel