php icon indicating copy to clipboard operation
php copied to clipboard

Ability to install additional CLI packages?

Open DenverCoder1 opened this issue 2 years ago • 8 comments

Is it currently possible to tell Vercel to install additional packages to be made available at runtime?

I am not referring to packages installable via Composer, but rather ones you would install for use on the command line.

For example, if I wanted to run inkscape via shell_exec, would I be able to tell Vercel to install the inkscape package and avoid getting the sh: line 98: inkscape: command not found error?

DenverCoder1 avatar Dec 27 '22 04:12 DenverCoder1

Hi. There is build phase and runtime phase. During build phase we can install anything you want. But during runtime phase is it problematic. Is inkscape single binary without dependencies?

f3l1x avatar Dec 30 '22 09:12 f3l1x

Thanks for taking a look.

Not sure about dependencies, but it seems there are a few options including an executable Appimage.

https://inkscape.org/release/inkscape-1.2.2/

DenverCoder1 avatar Dec 30 '22 15:12 DenverCoder1

Any update on this?

Is there anything I can do to get inkscape installed?

Or, if not, is it possible to get the Imagick PHP extension?

Thanks!

DenverCoder1 avatar Sep 11 '23 19:09 DenverCoder1

Hi @DenverCoder1, I don't the the easy way how to do it right now.

f3l1x avatar Sep 13 '23 07:09 f3l1x

Ok, no problem.

On Heroku, I was able to add third party buildpacks that can install things. I have gotten inkscape working there by adding the buildpack https://github.com/heroku/heroku-buildpack-apt and having an Aptfile with "inkscape" as the contents.

Is it possible to install apt packages listed in a file with Vercel? I'm not really sure how Vercel's runtime works.

DenverCoder1 avatar Sep 13 '23 20:09 DenverCoder1

Aptfile would be great, but it's not possible right now.

f3l1x avatar Sep 17 '23 19:09 f3l1x

Okay, I'll look forward to hearing if you do find a good solution. 👍

DenverCoder1 avatar Sep 18 '23 07:09 DenverCoder1