Rsync not working with vercel deployment

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!!

Hi @umerhamid68, welcome to the Vercel Community!

Accessing terminal directly or installing third party CLI tools aren’t recommended or supported with Vercel.

Can you elaborate a little about your use case so we can see how to work around and resolve it with a different solution?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.