Shell script has error, but works fine when I SSH into the machine

My deployment script runs fine when I SSH into the machine and run the exact same command but it doesn’t work with the Circle build.

I receive this error,

sh ./circle.sh

const hlo = require(’./high-level-opt.js’)
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions…js (module.js:474:10)
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/pingpad_web/node_modules/firebase-tools/node_modules/tar/index.js:4:30)
at Module._compile (module.js:456:26)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)

What I don’t understand is that this exact command works perfectly fine when I SSH into the same machine in which Circle.ci failed.

Is there a difference in the environment when it is run through CircleCI and through SSH on that exact machine.

Set up has not changed at all and this was working yesterday.