Nightwatch passes on local Mac, but fails on CircleCI Linux

I’m using nightwatch to run e2e tests. On my local Mac there’s no problem.

On my local Mac I have Chrome 55, Firefox 50, PhantomJS 2.1.1, all tests pass.

But on CircleCI, the tests fail in every browser, however, each at a different step. I’m not sure whether it’s CircleCI’s problem, or the browsers on Linux.

Is anyone facing similar problem here? Here’s the snapshot:

Nevermind, I’ve fixed it.

How did you fix it?

I would like to know the fix too. We keep having similar problems.