skip to Main Content

I host a domain on plesk server. It contain Nodejs V 12.4.0, I am not using anything like express or so.. I Just create nuxt app using create-nuxt-app in my pc using NodeJs V. 16, then run command npm run build, Then after I uploaded the files/folder(.nuxt, nuxt.config.js, static and package.json) on server to folder httpdoc/merostatus.com/(uploaded all files/folder here).

Setting on Nodejs in server:

Document Root : /httpdocs/merostatus.com/static    
Application Mode : production  
Application URL : http://merostatus.com
Application Root : /httpdocs/merostatus.com  
Application Startup File : node_modules/nuxt/bin/nuxt.js

After this setting I click on NPM install button on Plesk and Restart App

But the output is not as desired. It is searching for pages folder, When I point Application Startup File to .nuxt/server.js It doesn’t found vue instance.

My server is on live just now for addressing issue
https://merostatus.com

2

Answers


  1. Chosen as BEST ANSWER

    I am currently using Plesk VPS server with OS Ubuntu 20.04

    I solved the issue by making change in following ways

    Step 1: Added nuxt-start module : npm install --save nuxt-start

    Step 2: Build the project : npm run build

    Step 3: Upload project to server including all dependencies (Whole project not only .nuxt)

    Step 4: Changing Setting on Nodejs in server:

    Document Root: /httpdocs    
    Application Mode: production  
    Application URL: http://merostatus.com
    Application Root: /httpdocs  
    Application Startup File: node_modules/nuxt-start/bin/nuxt-start.js
    

  2. If you do have target: server (default), you indeed need to npm run build. The usual process is going through either npm run build or npm run generate (if target: static).

    Then, uploading only your dist directory is enough. No need for any other files. Then, running npm run start (some platforms do this for you).

    I’m not sure about your Plesk server configuration but you can try to build your app and drop the dist directory at Netlify, at least to see if it builds there: https://app.netlify.com/drop

    Then, if you achieve this, we could look for Plesk.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search