From fc43f59fe19beb4d3b2861642b6e02c4eb5834ff Mon Sep 17 00:00:00 2001 From: Jules Bertholet Date: Tue, 27 Apr 2021 19:49:44 -0400 Subject: [PATCH] Fix Node build --- scripts/_common.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index ce478fd..6430929 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -20,11 +20,12 @@ function set_node_vars { function build_node_app { set_node_vars - cat >> "$final_path/package.json" <<< "$(grep electron $final_path/package.json)" + grep -v electron "$final_path/package.json" > "$final_path/server-package.json" + mv "$final_path/server-package.json" "$final_path/package.json" pushd "$final_path" chown -R $app:$app "$final_path" sudo -u $app touch "$final_path/.yarnrc" - sudo -u $app "env PATH=$node_path" yarn --cache-folder "$final_path/yarn-cache" --use-yarnrc "$final_path/.yarnrc" install --production 2>&1 + sudo -u $app env "PATH=$node_path" yarn --cache-folder "$final_path/yarn-cache" --use-yarnrc "$final_path/.yarnrc" install --production 2>&1 chown -R root:root "$final_path" popd