sass/dart-sass-embedded

Alpine linux support?

dmifedorenko opened this issue · 2 comments

Good day.

I am trying to use dart-sass-embedded in Docker image builded from official node:18-alpine image.

By default dart-sass-embedded dont work on alpine with error:

bash-5.1# ./dist/lib/src/vendor/dart-sass-embedded/dart-sass-embedded
bash: ./dist/lib/src/vendor/dart-sass-embedded/dart-sass-embedded: No such file or directory

I tried install apk add build-base gcompat or apk add libc6-compat but had same error:

bash-5.1# ./dist/lib/src/vendor/dart-sass-embedded/dart-sass-embedded
Segmentation fault

I tried to use gdb to find fault details but dart-sass-embedded has no debugging symbols.

On install download-compiler-for-end-user.js downloaded https://github.com/sass/dart-sass-embedded/releases/download/1.50.1/sass_embedded-1.50.1-linux-x64.tar.gz inside alphine Docker.

Is where any chase to exec dart sass on alpine?

BTW. It was very hard to find out real reason of problem. I spend some house in debugging. It will be grate if node sass-embedded module can show details if binary broken then is try to exec it.

How did you install the embedded compiler on Alpine? Once installed, how are you running it? (it has to be run via a host like embedded-host-node).

ntkme commented

Dart itself does not work with musl-libc, it only works with glibc. So dart-sass-embedded simply won't work in alpine. gcompat is not 100% compatible with glibc.

See dart-lang/sdk#40906