flow/flow-bin

running flow-bin on alpine-linux does not work

gabor opened this issue · 5 comments

gabor commented

this package currently does not work on alpine-linux, it would be nice to make it work there too.

...Could you give any specifics? Outputs? Log files? Anything that might help out?

gabor commented

well, when you start it on alpine-linux, you get an error-message and it ends.

steps to reproduce, with docker:

  1. docker run -it node:8-alpine /bin/sh
  2. (inside the docker image) npm install flow-bin
  3. (inside the docker image) ./node_modules/.bin/flow

and you get an error-message:

/ # ./node_modules/.bin/flow 
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: spawn /node_modules/flow-bin/flow-linux64-v0.83.0/flow ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    at onErrorNT (internal/child_process.js:362:16)
    at _combinedTickCallback (internal/process/next_tick.js:139:11)
    at process._tickCallback (internal/process/next_tick.js:181:9)
    at Function.Module.runMain (module.js:696:11)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3
/ # 

to me it seems the package is a collection of prebuilt flow-binaries, and it simply does not have an alpine-linux-compatible binary.

Well, the important line is the ENOENT one. Especially because it seems as though it's somehow referring to root (/node_modules/flow-bin/flow-linux64-v0.83.0/flow) instead of the local folder( ./node_modules/flow-bin/flow-linux64-v0.83.0/flow). You might want to file this one with both the Node people and the Alpine Linux people as well (I don't know), because I'm fairly certain that there shouldn't be any reason it can't get the linux64 binary. Alpine Linux should be able to use the exact same one I have in my Antergos box.

gabor commented

generally the difference is that alpine-linux is built on musl not on glibc, and that causes problems with binaries, that's why i assumed the problem is the same here.

see for example issues like:
facebook/flow#3649

i also tried to run the binary directly, to focus more on the problem:

if i directly run the flow-binary with: ./node_modules/flow-bin/flow-linux64-v0.83.0/flow
i get an error saying: /bin/sh: ./node_modules/flow-bin/flow-linux64-v0.83.0/flow: not found, but the file exist in the mentioned position, with the executable flag set.if i for start other binaries that exist in the docker-image, like /usr/local/bin/node then that one works normally.

if i switch to a non-alpine docker-image, for example:

  1. docker run -it node:8 /bin/sh
  2. (inside the docker image) npm install flow-bin
  3. (inside the docker image) ./node_modules/flow-bin/flow-linux64-v0.83.0/flow, then it works.
mroch commented

closing in favor of facebook/flow#7509. thanks!