I deployed a project that uses rsync to perform some syncing tasks on project build and dev. The script is configured to run on prepare.
On deployment, I got an error stating rsync is not supported.
Here is the error log:
. prepare: sh: line 1: rsync: command not found
. prepare: ELIFECYCLE Command failed.
. prepare: Failed
ELIFECYCLE Command failed with exit code 1.
Error: Command "pnpm install" exited with 1
My question is, is there a way for us to install the rsync utility during installation time i.e. when the pnpm install command is run? I tried configuring the buildCommand in the vercel.json file to run the installation command during build but the error still remains as i got it during installation way before the buildCommand can be executed. I also tried making an sh file with a bash script and running that during installation.
Script:
#!/bin/bash
echo "Installing rsync..."
apt-get update && apt-get install -y rsync
echo "rsync installed successfully!"
This also gives errors and does not work.
Any help on how to resolve this would be appreciated!!