• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Issue yarn: command not found when running Git deployment using non-admin account

captainhook

Basic Pleskian
I have granted chrooted SSH access on the domain's hosting settings.

I have also added all the binaries in /opt/plesk/node/18/bin/ to the domain's chroot.

However when I run a git deployment with the following code in the additional deployment actions:
Bash:
#!/bin/bash
rm -rf tmp
(PATH=/opt/plesk/node/18/bin/:$PATH; yarn install && sed -i 's/const defaultCommand = "dev";/const defaultCommand = "start";/g' node_modules/next/dist/bin/next && yarn build &> npm-install.log)
mkdir tmp
touch tmp/restart.txt

I get this error:
Bash:
-: yarn: command not found

I appear to be able to run something like 'yarn --version' successfully under the domain > Node.js > Run Node.js commands. So I'm confused why it fails in the git deployment's additional actions step.
 
Have you tried the same with the fully qualified path to yarn starting at /var/www/vhosts/<your subscription>/.....<your binary path> etc.?
 
Yeap, same thing:
-: /var/www/vhosts/domain.com/opt/plesk/node/18/bin/yarn: No such file or directory

I also tried running yarn through the terminal:
bash: opt/plesk/node/18/bin/yarn: /opt/plesk/node/18/bin/node: bad interpreter: No such file or directory
 
I tried replacing the Git additional deployment script with the following:
#!/bin/bash
rm -rf tmp
/opt/plesk/node/18/bin/yarn install &> npm-install.log
sed -i 's/const defaultCommand = "dev";/const defaultCommand = "start";/g' node_modules/next/dist/bin/next &>> npm-install.log
/opt/plesk/node/18/bin/yarn build &>> npm-install.log
mkdir tmp
touch tmp/restart.txt

I got:
-: /opt/plesk/node/18/bin/yarn: /opt/plesk/node/18/bin/node: bad interpreter: No such file or directory
 
Has this been reproducible internally? I can run deployments with these additional commands using the admin account, but no other accounts can.
 
Back
Top