diff --git a/scripts/upgrade b/scripts/upgrade index a160dea..568eb7d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -135,16 +135,13 @@ ynh_script_progression --message="Building Yarn dependencies... This can be very pushd "$final_path" ynh_use_nodejs - ynh_script_progression --message="Fetching Yarn dev dependencies... This can be very long, be patient !" --weight=5 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --no-optional --frozen-lockfile --network-timeout 1000000000 2>&1 - ynh_script_progression --message="Cleaning cache... " --weight=1 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 - ynh_script_progression --message="Building Yarn dev dependencies... This can be very long, be patient !" --weight=5 - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build 2>&1 - ynh_script_progression --message="Fetching Yarn production dependencies... This can be very long, be patient !" --weight=5 + export NODE_OPTIONS=--max_old_space_size=1024 + ynh_script_progression --message="Fetching Yarn production dependencies... This can be very long, be patient !" --weight=18 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn install --production=true --frozen-lockfile --network-timeout 1000000000 2>&1 - ynh_script_progression --message="Cleaning cache... " --weight=1 + ynh_script_progression --message="Cleaning cache... " --weight=3 ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1 + ynh_script_progression --message="Building... This can be very long, be patient !" --weight=18 + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn build 2>&1 popd #=================================================