From 286fa35e3b1cfee8a5bd349a537655c135f183c9 Mon Sep 17 00:00:00 2001 From: Neko Nekowazarashi Date: Mon, 29 May 2023 18:24:24 +0700 Subject: [PATCH] perbaiki npm --- scripts/change_url | 5 +++-- scripts/install | 5 +++-- scripts/upgrade | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index cf31e3e..759de90 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -41,9 +41,10 @@ fi #================================================= ynh_script_progression --message="Rebuilding the app..." --weight=1 -npm install --prefix "$install_dir" +ynh_use_nodejs +ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install npx next telemetry disable -npm run build --prefix "$install_dir" +ynh_exec_as $app $ynh_node_load_PATH $ynh_npm build #================================================= # GENERIC FINALISATION diff --git a/scripts/install b/scripts/install index 1e352c5..85963f7 100755 --- a/scripts/install +++ b/scripts/install @@ -55,9 +55,10 @@ chown $app:$app "$install_dir/.env.local" #================================================= ynh_script_progression --message="Building the app..." --weight=1 -CYPRESS_CACHE_FOLDER="$install_dir/.cache/cypress npm install --prefix "$install_dir" +ynh_use_nodejs +ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install npx next telemetry disable -CYPRESS_CACHE_FOLDER="$install_dir/.cache/cypress npm run build --prefix "$install_dir" +ynh_exec_as $app $ynh_node_load_PATH $ynh_npm build #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 036937c..938949a 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -116,9 +116,10 @@ chown $app:$app "$install_dir/.env.local" #================================================= ynh_script_progression --message="Rebuilding the app..." --weight=1 -CYPRESS_CACHE_FOLDER="$install_dir/.cache/cypress" npm install --prefix "$install_dir" +ynh_use_nodejs +ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install npx next telemetry disable -CYPRESS_CACHE_FOLDER="$install_dir/.cache/cypress" npm run build --prefix "$install_dir" +ynh_exec_as $app $ynh_node_load_PATH $ynh_npm build #================================================= # START SYSTEMD SERVICE