Node JS required and settings
Connect to the VM again (in case you exit or loose connection):
ssh root@<IP address>
where - the address of the VM for deploy
Install node LTS version
Source to install for Ubuntu only for one user: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-20-04
If You are going to use autodeploy under other user (for example gitlab-runner user) each changes of the Marionette project settings (Marionette Stack) You should install Node JS available to all users of the VM operation system.
Here is installing Node JS available to all Users with nvm:
cd ~ apt update
make dir for nvm:
mkdir /usr/local/nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.38.0/install.sh | NVM_DIR=/usr/local/nvm bash
Enter to folder /etc/profile.d add create there file nvm.sh
cd /etc/profile.d && vi nvm.sh
Fill the nvm.sh file next
#!/usr/bin/env bash export NVM_DIR="/usr/local/nvm" source /usr/local/nvm/nvm.sh [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" #loads nvm
Make /etc/profile.d/nvm.sh as source:
source /etc/profile.d/nvm.sh
Install nvm:
nvm install --lts
or
# Look at the list of the node versions nvm list-remote # install any nvm install [version]
where [version] - newest recommended LTS version from the node list versions
Type and run next command for export necessary paths to all users (not necessary):
n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r $n/{bin,lib,share} /usr/local
Verify you’ve installed the required version
node -v
You'll get, for example, similar answer of the version: