From 50ce0ab75b54aafc70725cc9d21cc919536bf401 Mon Sep 17 00:00:00 2001 From: Neko Nekowazarashi Date: Mon, 29 May 2023 21:34:57 +0700 Subject: [PATCH] mulai nodejs sebelum penambahan konfigurasi --- scripts/install | 6 +++++- scripts/upgrade | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 7921233..33fc2a7 100755 --- a/scripts/install +++ b/scripts/install @@ -9,6 +9,11 @@ source _common.sh source /usr/share/yunohost/helpers +#================================================= +# STARTING NODEJS +#================================================= + +ynh_use_nodejs #================================================= # APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC) @@ -68,7 +73,6 @@ echo "module.exports = { basePath: '$next_path', };" >> "$install_dir/next.confi ynh_script_progression --message="Building the app..." --weight=1 ynh_install_nodejs --nodejs_version=18.16.0 -ynh_use_nodejs ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install --prefix="$install_dir" npx next telemetry disable ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run build --prefix="$install_dir" diff --git a/scripts/upgrade b/scripts/upgrade index f703b76..566d96a 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -81,6 +81,12 @@ fi # ownership to all files such as after the ynh_setup_source step chown -R $app:www-data "$install_dir" +#================================================= +# STARTING NODEJS +#================================================= + +ynh_use_nodejs + #================================================= # REAPPLY SYSTEM CONFIGURATIONS #================================================= @@ -116,7 +122,6 @@ chown $app:$app "$install_dir/.env.local" #================================================= ynh_script_progression --message="Rebuilding the app..." --weight=1 -ynh_use_nodejs ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install --prefix="$install_dir" npx next telemetry disable ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run build --prefix="$install_dir"