mifi / editly

Slick, declarative command line video editing & API
MIT License
4.64k stars 296 forks source link

cannot run on docker running on osx m1 #141

Open zt9 opened 2 years ago

zt9 commented 2 years ago

I have a MacBook Air with m1 and I installed docker, rosetta 2 to get docker going I got editly commit 6e69f4b33949502b9964c7f2826c07d2ffa20e1e and then ran docker compose up

I get the following error - please let me know if I need to do something else

internal/modules/cjs/loader.js:1250

  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: /app/node_modules/canvas/build/Release/libpango-1.0.so.0: undefined symbol: fribidi_get_par_embedding_levels_ex
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1250:18)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.<anonymous> (/app/node_modules/canvas/lib/bindings.js:3:18)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
internal/modules/cjs/loader.js:1250
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: /app/node_modules/canvas/build/Release/libpango-1.0.so.0: undefined symbol: fribidi_get_par_embedding_levels_ex
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1250:18)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.<anonymous> (/app/node_modules/canvas/lib/bindings.js:3:18)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
zt9 commented 2 years ago

any one else having trouble running docker? Appreciate any help!

VirenMohindra commented 2 years ago

In the same boat, did you manage to figure out a solution @zt9?

mjmeintjes commented 2 years ago

Similar issue here: https://github.com/mifi/editly/issues/109

saschaglo commented 2 years ago

@zt9 I was facing the same issue and the thing I did was to change the LD_LIBRARY_PATH env-var. It seems that the current setup with the current value of that var points to an older version which seems being erroneous.

This is what I did in the Dockerfile, I've added these two lines right after the title:

[...]
## INSTALL EDITLY

RUN echo "export LD_LIBRARY_PATH=/app/node_modules/canvas/build/Release/" >> /root/.bashrc
ENV LD_LIBRARY_PATH /app/node_modules/canvas/build/Release/
[...]

Secondly, I removed the image: property from the docker-compose.yml and re-built the image from the Dockerfile via docker-compose build, then fired up the system again with docker-compose up and since then, everything worked fine for me. Give it a try.