While running FlowJS check
node_modules/.bin/flow check
inside docker image based on node:latest
(currently 6.5)
You see error
$ npm i
...
npm info lifecycle flow-bin@0.31.1~postinstall: flow-bin@0.31.1
> flow-bin@0.31.1 postinstall .../node_modules/flow-bin
> node lib/install.js
✖ The `.../node_modules/flow-bin/vendor/flow` binary doesn't seem to work correctly
✖ flow binary test failed
...
$ node_modules/.bin/flow check
.../node_modules/flow-bin/vendor/flow: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory
ERROR: Build failed: exit code 1
E.g. flow
cannot be run under vanilla node:latest
docker image
答案 0 :(得分:1)
Related issue https://github.com/facebook/flow/issues/210
In case your image is from node:latest
(which is debian:jessie
under the hood)
you need to add a little bit update to apt
:
$ apt-get update -qq
$ apt-get install -qy libelf1
before any runs (e.g. in Dockerfile
or corresponding section of .gitlab-ci.yml
)