npm run build not working as "dist" directory doesn't exists
As I tried to install a production version of sepia, I got this error:
$npm run build > firstname.lastname@example.org build /var/www/peertube-search-index > rm -r dist && tsc && cp -r themes dist/ && cd ./client && npm run build rm: impossible de supprimer 'dist': Aucun fichier ou dossier de ce type npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! email@example.com build: `rm -r dist && tsc && cp -r themes dist/ && cd ./client && npm run build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the firstname.lastname@example.org 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-12T15_06_12_275Z-debug.log
It appears that it fails because the "dist" directory doesn't exists. Creating this directory resolve the error.