pixijs/floss

Running floss in Docker returns null

Closed this issue · 2 comments

We have a test suite that we call like this: ./node_modules/floss/bin/floss.js --path test/index.js
Running it locally on our dev machines outside Docker works like expected, it runs the test suite and returns correct exit code.

However, running it inside Docker fails and returns null.
Here's the log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'test' ]
2 info using npm@6.1.0
3 info using node@v10.4.1
4 verbose run-script [ 'pretest', 'test', 'posttest' ]
5 info lifecycle frontend@1.0.0~pretest: frontend@1.0.0
6 info lifecycle frontend@1.0.0~test: frontend@1.0.0
7 verbose lifecycle frontend@1.0.0~test: unsafe-perm in lifecycle true
8 verbose lifecycle frontend@1.0.0~test: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/frontend/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
9 verbose lifecycle frontend@1.0.0~test: CWD: /frontend
10 silly lifecycle frontend@1.0.0~test: Args: [ '-c',
10 silly lifecycle   './node_modules/floss/bin/floss.js --path test/index.js' ]
11 silly lifecycle frontend@1.0.0~test: Returned: code: 1  signal: null
12 info lifecycle frontend@1.0.0~test: Failed to exec test script
13 verbose stack Error: frontend@1.0.0 test: `./node_modules/floss/bin/floss.js --path test/index.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:304:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:961:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
14 verbose pkgid frontend@1.0.0
15 verbose cwd /frontend
16 verbose Linux 4.15.0-42-generic
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "test"
18 verbose node v10.4.1
19 verbose npm  v6.1.0
20 error code ELIFECYCLE
21 error errno 1
22 error frontend@1.0.0 test: `./node_modules/floss/bin/floss.js --path test/index.js`
22 error Exit status 1
23 error Failed at the frontend@1.0.0 test script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

node_modules/floss/bin/floss.js exists on path in Docker and so does test/index.js.

Is there a special set-up for floss in Docker, or is that a bug in floss?

If you need more info to reproduce this issue, just let me know, I am floss and Docker newbie. :)

If you are running in Docker, maybe make sure that your instance supports Xvfb? Possibly something like this: https://github.com/auth0/docker-xvfb

That actually sounds like a plausible way to solve this, unfortunately, we moved away from floss since (and the project does not actually exist anymore), so I will not be able to try it out.

I will, therefore, close this issue. But thanks for your response :D