I've just deployed my Vue project into my Cpanel using ssh. Let's say, I clone the repo to /var/www/
it will generate the repo right, so it will generate the repo-generated
folder in /var/www/
.
So we call it, /var/www/repo-generated
. And then I get into this folder and start to do an act npm install
and it has no problem, and then for the servers can read my sites I create the symlink from the root folder
to my repo folder
, so I do a command
ln -s /var/www/repo-generated/dist/ /var/www/html
and its done, the symlink already created. and for the generated my projects, i do a command,
npm run build
and it will generate the dist
folder on repo-generated folder
right
but when I do that command, it has an errors.
[root@backend-mpp dh-payroll-frontend]# npm run build
> payroll@0.1.0 build /var/www/dh-payroll-frontend
> vue-cli-service build
⠸ Building for production...
ERROR Failed to compile with 1 error 10:44:58 PM
error
ENOENT: no such file or directory, stat '/var/www/dh-payroll-frontend/public/dist'
ERROR Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! payroll@0.1.0 build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the payroll@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-08-24T14_44_58_346Z-debug.log
I using vue.js version 2.
Please help.
Can anyone help me? Please....
Thank you before everyone ^_^