marko-js / cli

command-line tools for Marko
MIT License
95 stars 36 forks source link

Cannot install on armhf targets #133

Open MiloCasagrande opened 5 years ago

MiloCasagrande commented 5 years ago

marko-cli@7.0.1

Details

When building a docker container with markojs and marko-cli dependencies on an armhf target, the container build fails due to the chromedriver dependency of @marko/test, that is a dependency of marko-cli.

chromedriver is not available on armhf targets (I guess it's not available for any arm target).

Possible Workaround

I managed to build a docker image setting ENV CHROMEDRIVER_SKIP_DOWNLOAD=true in the Dockerfile.

We don't run tests on our markojs files while building the containers, so it's a "safe" workaround for us.

Additional Info ### Your Environment - Ubuntu image on `arm8l` - Kernel 4.15.0 - docker 18.09.5 ### Steps to Reproduce You need an `armhf`-capable docker builder to reproduce this.
MiloCasagrande commented 4 years ago

Update for marko-cli@7.0.11

When building an armhf docker container, marko-cli now fails when installing pngquant-bin, dependency brought in by imagemin-webpack-plugin from @marko/build.

Reported error is:

pngquant failed to build, make sure that libpng-dev is installed

although libpng-dev is installed in the building docker image (along with all the necessary make/gcc/g++... build dependencies).

There is no workaround for this, not sure if switching to imagemin-webpack and making the image plugins optional could be an option to solve this issue.

tigt commented 1 year ago

I'm partial to making image optimization steps not run on every build, as long as every build checks to make sure images don’t exceed some threshold of bytes:pixel ratio. That would also let us move imagemin-webpack into optionalDependencies.