Skip to content

Commit 30ecb83

Browse files
committed
SCRIPT DEPRECATION WARNING Node JS install script
You don't want to wait 60 sec
1 parent be7ae73 commit 30ecb83

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

bin/v-update-sys-hestia-git

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ source /etc/hestiacp/hestia.conf
2020
source $HESTIA/func/main.sh
2121
# load config file
2222
source_conf "$HESTIA/conf/hestia.conf"
23+
# define NodeJS version for download (required for building JS/CSS)
24+
NODE_MAJOR=20
2325

2426
# Perform verification if read-only mode is enabled
2527
check_hestia_demo_mode
@@ -28,6 +30,10 @@ check_hestia_demo_mode
2830
if [ -z $(which "node") ]; then
2931
read -p "NodeJS not found. Install now to proceed? [Y/n] " answer
3032
if [ "$answer" = 'y' ] || [ "$answer" = 'Y' ]; then
33+
sudo mkdir -p /etc/apt/keyrings
34+
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
35+
36+
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
3137
sudo apt-get install -y nodejs
3238
else
3339
exit 0
@@ -305,7 +311,7 @@ mkdir -p $BUILD_DIR_HESTIA/usr/local/hestia
305311
# Move needed directories
306312
cd $BUILD_DIR/hestiacp-$branch_dash
307313

308-
npm ci
314+
npm install
309315
npm run build
310316

311317
cp -rf bin func install web $BUILD_DIR_HESTIA/usr/local/hestia/

0 commit comments

Comments
 (0)