A system error occurred: uv_os_homedir returned EEXIST (file already exists)

Im creating my first homey app for personal use that uploads a file to s3 bucket. when runnning my app by homey app run the flow card works as expected but when using it through homey app install im getting this error:

A system error occurred: uv_os_homedir returned EEXIST (file already exists)

for anyone googling this i solved it by adding

  process.env.HOME = '/tmp';

apparently s3client is looking for a home folder but homey doesn’t have one. by setting a fake one this problem is circumvented.