i found that with *modern* node versions (>16) yarn should be (available through corepack](https://github.com/nodejs/corepack)
and that it should [be possible to use](https://github.com/nodejs/corepack#corepack-binary-nameversion--args)
for example `corepack yarn install`.
i tried with just `corepack --version` (this works on my dev system and returns the version number 0.15.3)
but as git action it returns `./deployit.sh: line 9: corepack: command not found`
(as it is called fromt `deployit.sh`)
i also tried with an
`node --version &>> $MYLOG`
results in the same:
`./deployit.sh: line 7: node: command not found`
so i think we need the full path to node / corepack.
i tried with [this tipp to add a `.npmrc` with the content `scripts-prepend-node-path=true` to the node app root...](https://support.plesk.com/hc/en-us/articles/360000644114-Node-js-Run-Script-option-fails-on-Plesk-server-no-node-binary-in-the-current-PATH)
but it did not change something..
for the full path i found something like
`/opt/plesk/node/VERSION/bin` but a check with
`ls -l /opt/plesk/node/` resulted in `ls: cannot access '/opt/plesk/node/': No such file or directory`
so i think i am in the wrong location...
i then found this post -
Question - Nodejs cron job
and the output of `ls -l /opt/plesk/node/*/bin/node &>> ../app_deploy.txt` is for me:
```bash
ls: cannot access '/opt/plesk/node/*/bin/node': No such file or directory
```
so i just tried with
```bash
ls -l /
total 88
lrwxrwxrwx 262 root root 7 Dec 21 19:14 bin -> usr/bin
drwxr-xr-x 2 hosting4242 psacln 4096 Oct 5 2018 conf
drwxr-xr-x 2 root root 4096 Aug 30 2022 conf-options
drwxr-xr-x 2 root root 4096 Dec 21 19:20 dev
drwxr-xr-x 2 hosting4242 psacln 4096 May 25 2018 error_docs
drwxr-xr-x 7 root root 4096 Mar 21 11:05 etc
drwxr-xr-x 4 hosting4242 psacln 4096 Mar 16 23:34 git
drwxr-x--- 21 hosting4242 psaserv 4096 Mar 10 09:05 httpdocs
drwxr-xr-x 4 root root 4096 Mar 21 11:05 lib
drwxr-xr-x 2 root root 4096 Dec 21 19:20 lib64
drwx------ 23 hosting4242 root 4096 Mar 20 18:38 logs
drwxr-xr-x 2 hosting4242 psacln 4096 May 14 2019 snapshots
drwxrwxrwt 2 root root 4096 Dec 21 19:20 tmp
drwxr-xr-x 7 root root 4096 Dec 21 19:20 usr
drwxr-xr-x 3 root root 4096 Dec 21 19:20 var
drwxr-xr-x 2 hosting4242 psacln 4096 Dec 8 22:42 wordpress-backups
```
i then had a look at the usr/bin folder:
```bash
echo "ls -l /bin" &>> ../app_deploy.txt
ls -l /bin &>> ../app_deploy.txt
echo "check /usr/bin" &>> ../app_deploy.txt
ls -l /usr/bin &>> ../app_deploy.txt
echo "check /usr/bin/bin" &>> ../app_deploy.txt
ls -l /usr/bin/bin &>> ../app_deploy.txt
# resulted in
ls -l /bin
lrwxrwxrwx 262 root root 7 Dec 21 19:14 /bin -> usr/bin
check /usr/bin
total 35560
-rwxr-xr-x 262 root root 39520 Feb 28 2019 basename
-rwxr-xr-x 262 root root 1168776 Apr 18 2019 bash
lrwxrwxrwx 262 root root 4 Dec 21 19:14 bin -> /bin
-rwxr-xr-x 262 root root 38984 Jul 21 2020 bunzip2
-rwxr-xr-x 262 root root 38984 Jul 21 2020 bzcat
-rwxr-xr-x 262 root root 2225 Jul 21 2020 bzdiff
-rwxr-xr-x 262 root root 3641 Jul 21 2020 bzgrep
-rwxr-xr-x 262 root root 38984 Jul 21 2020 bzip2
-rwxr-xr-x 262 root root 1297 Jul 21 2020 bzmore
-rwxr-xr-x 262 root root 43744 Feb 28 2019 cat
-rwxr-xr-x 262 root root 64288 Feb 28 2019 chmod
-rwxr-xr-x 262 root root 14336 Oct 28 23:03 clear
-rwxr-xr-x 262 root root 14488 Mar 18 12:58 convert
-rwxr-xr-x 262 root root 146880 Feb 28 2019 cp
-rwxr-xr-x 262 root root 231496 Feb 24 08:25 curl
-rwxr-xr-x 262 root root 43776 Feb 28 2019 cut
-rwxr-xr-x 262 root root 109408 Feb 28 2019 date
-rwxr-xr-x 262 root root 220448 Apr 8 2019 diff
-rwxr-xr-x 262 root root 35424 Feb 28 2019 dirname
-rwxr-xr-x 262 root root 109664 Feb 28 2019 du
-rwxr-xr-x 262 root root 43680 Feb 28 2019 env
-rwxr-xr-x 262 root root 35424 Feb 28 2019 false
-rwxr-xr-x 262 root root 26944 Jan 25 2021 file
-rwxr-xr-x 262 root root 315904 Feb 16 2019 find
-rwxr-xr-x 262 root root 102008 Feb 24 2019 ftp
-rwxr-xr-x 262 root root 2746104 Feb 23 16:14 git
-rwxr-xr-x 262 root root 2746104 Feb 23 16:14 git-receive-pack
-rwxr-xr-x 262 root root 2746104 Feb 23 16:14 git-upload-pack
-rwxr-xr-x 262 root root 198976 Jan 7 2019 grep
-rwxr-xr-x 262 root root 39584 Feb 28 2019 groups
-rwxr-xr-x 262 root root 2345 Apr 15 2022 gunzip
-rwxr-xr-x 262 root root 98048 Apr 15 2022 gzip
-rwxr-xr-x 262 root root 47840 Feb 28 2019 head
-rwxr-xr-x 262 root root 43808 Feb 28 2019 id
-rwxr-xr-x 262 root root 166664 May 7 2018 less
-rwxr-xr-x 262 root root 68552 Feb 28 2019 ln
-rwxr-xr-x 262 root root 138856 Feb 28 2019 ls
-rwxr-xr-x 262 root root 47840 Feb 28 2019 md5sum
-rwxr-xr-x 262 root root 89088 Feb 28 2019 mkdir
-rwxr-xr-x 262 root root 43808 Feb 28 2019 mktemp
-rwxr-xr-x 262 root root 14488 Jun 25 2020 mogrify
-rwxr-xr-x 262 root root 43008 Jan 10 2019 more
-rwxr-xr-x 262 root root 138728 Feb 28 2019 mv
-rwxr-xr-x 262 root root 4093304 Feb 10 06:59 mysql
-rwxr-xr-x 262 root root 3930560 Feb 10 06:59 mysqldump
-rwxr-xr-x 262 root root 246160 Jun 12 2019 nano
-rwxr-xr-x 262 root root 187840 Jul 26 2019 patch
lrwxrwxrwx 1 root root 24 Mar 21 17:08 php -> /usr/local/php72/bin/php
-rwxr-xr-x 262 root root 4777720 Feb 26 14:00 php.os
-rwxr-xr-x 262 root root 56000 Feb 28 2019 printf
-rwxr-xr-x 262 root root 39616 Feb 28 2019 pwd
-rwxr-xr-x 262 root root 47776 Feb 28 2019 readlink
-rwxr-xr-x 262 root root 68416 Feb 28 2019 rm
-rwxr-xr-x 262 root root 47776 Feb 28 2019 rmdir
-rwxr-xr-x 262 root root 100496 Jan 31 2020 scp
-rwxr-xr-x 262 root root 122224 Dec 22 2018 sed
-rwxr-xr-x 262 root root 153960 Jan 31 2020 sftp
-rwxr-xr-x 262 root root 1168776 Apr 18 2019 sh
-rwxr-xr-x 262 root root 51936 Feb 28 2019 sha1sum
-rwxr-xr-x 262 root root 56032 Feb 28 2019 sha224sum
-rwxr-xr-x 262 root root 56032 Feb 28 2019 sha256sum
-rwxr-xr-x 262 root root 64224 Feb 28 2019 sha384sum
-rwxr-xr-x 262 root root 64224 Feb 28 2019 sha512sum
-rwxr-xr-x 262 root root 39552 Feb 28 2019 sleep
-rwxr-xr-x 262 root root 114120 Feb 28 2019 sort
-rwxr-xr-x 262 root root 727848 Jan 31 2020 ssh
-rwxr-xr-x 262 root root 415896 Jan 31 2020 ssh-keygen
-rwxr-xr-x 262 root root 43744 Feb 28 2019 tac
-rwxr-xr-x 262 root root 72608 Feb 28 2019 tail
-rwxr-xr-x 262 root root 445560 Apr 23 2019 tar
-rwxr-xr-x 262 root root 39648 Feb 28 2019 tee
-rwxr-xr-x 262 root root 97152 Feb 28 2019 touch
-rwxr-xr-x 262 root root 51904 Feb 28 2019 tr
-rwxr-xr-x 262 root root 35424 Feb 28 2019 true
-rwxr-xr-x 262 root root 39584 Feb 28 2019 uname
-rwxr-xr-x 262 root root 51968 Feb 28 2019 uniq
-rwxr-xr-x 262 root root 183136 Sep 22 18:25 unzip
-rwxr-xr-x 262 root root 2708456 Nov 23 15:54 vi
-rwxr-xr-x 262 root root 2708456 Nov 23 15:54 vim
-rwxr-xr-x 262 root root 47880 Feb 28 2019 wc
-rwxr-xr-x 262 root root 466496 Apr 5 2019 wget
-rwxr-xr-x 262 root root 946 Jan 21 2019 which
-rwxr-xr-x 262 root root 35456 Feb 28 2019 whoami
-rwxr-xr-x 262 root root 71896 Feb 16 2019 xargs
-rwxr-xr-x 262 root root 1983 Apr 15 2022 zcat
-rwxr-xr-x 262 root root 5897 Apr 15 2022 zdiff
-rwxr-xr-x 262 root root 8048 Apr 15 2022 zgrep
-rwxr-xr-x 262 root root 213136 Aug 16 2015 zip
-rwxr-xr-x 262 root root 2205 Apr 15 2022 zless
-rwxr-xr-x 262 root root 1841 Apr 15 2022 zmore
check /usr/bin/bin
lrwxrwxrwx 262 root root 4 Dec 21 19:14 /usr/bin/bin -> /bin
```
i then had the idea to let [node itself tell me its path](https://stackoverflow.com/questions/49934315/how-to-get-path-of-nodejs-executable-on-runtime#49934868).
so i added
```json
"path": "node -e 'console.log(process.argv[0])'"
```
to the `package.json` file..
and then clicked the execute script button and entered path
```
yarn run v1.22.19
$ node -e 'console.log(process.argv[0])'
/opt/plesk/node/18/bin/node
Done in 0.13s.
```
ok - that is fine ;-) i can try with this full path...
i entered
```
echo "/opt/plesk/node/18/bin/node --version" &>> ../app_deploy.txt
/opt/plesk/node/18/bin/node --version &>> ../app_deploy.txt
```
in my git actions
and the result was
```
/opt/plesk/node/18/bin/node --version
-: /opt/plesk/node/18/bin/node: No such file or directory
```
so i have absolutly no idea where to search for the node versions...
or - more - i think i have no chance to get to it ....
seems in this (chrooted) enviroment i have no access to it....
if this is true we have no chance to use the git `additional deployment actions` for node / yarn and so on....
:-(
i hope others find a solution.
for now i give up.
sunny greetings
stefan