Mocha exploded! Selenium-webdriver appears to be the issue with a broken build

I’ve got nodejs application with ui tests using mocha and selenium-webdriver. Whilst the test works fine in my local build environment it reports the following in the build on circleci:

/home/ubuntu/TeamZone/node_modules/selenium-webdriver/index.js:25
const builder = require(‘./builder’);
^^^^^

Mocha exploded!
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Module._extensions…js (module.js:474:10)
at Object.require.extensions…js (/home/ubuntu/TeamZone/node_modules/blanket/src/index.js:145:17)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/ubuntu/TeamZone/ui-test/full/steps/LoginWithEmail.js:2:17)
at Module._compile (module.js:456:26)
at Module._extensions…js (module.js:474:10)
at Object.require.extensions…js (/home/ubuntu/TeamZone/node_modules/blanket/src/index.js:145:17)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/ubuntu/TeamZone/ui-test/full/steps/testLoginWithEmail.js:14:15)
Warning: Task “mochaTest:cibuild” failed.a Use --force to continue.

Aborted due to warnings.

grunt cibuild returned exit code 3

Are you using our Precise or Trusty image?

What are the differences between your local build environment and ours?

Thanks!

You gave us a clue. We checked the differences and upgraded node and downloaded later versions of libraries.

All good now.

Thanks