Gridsome is a Vue.js static site generaqtor that requires yarn, nodejs and NPM in order to generate website files.
I recommend using two separate devices, one on which you develop the site and another where it will bi published. But, if you for some reason want to use cPanel to both develop the website and publish it, here is how to do it:
1. Create a new Node.js app in cPanel
Make sure to select Node.js >=14
2. Upload Gridsome files to the folder
In this case, I will use the Gridsome docs website and upload it to the application root/public:
3. Open the terminal
Enter terminal and paste the command that you see on top of the Node.js create app page:
source /home/XXXX/nodevenv/plugins.club/app/10/bin/activate && cd /home/XXXXX/plugins.club/app
Install yarn with the command:
curl -o- -L https://yarnpkg.com/install.sh | bash
Enter the public folder:
yarn global add @gridsome/cli
Install required modules
npm install
Enter the public folder and run yarn build
cd public/ && yarn build
This will create a new directory /dist and output all the static files in it.
I recommend using Git + Netlify for easier publishing. 🙂