Explore Courses Blog Tutorials Interview Questions
0 votes
in DevOps and Agile by (19.7k points)

Getting the below-shown error when starting nodejs server with selenium webdriver

ubuntu@ip-10-10-10-193:~/testenvoy$ node app.js


  static createSession(...args) {}


SyntaxError: Unexpected token ...

    at exports.runInThisContext (vm.js:53:16)

    at Module._compile (module.js:373:25)

    at Object.Module._extensions..js (module.js:416:10)

    at Module.load (module.js:343:32)

    at Function.Module._load (module.js:300:12)

    at Module.require (module.js:353:17)

    at require (internal/module.js:12:17)

    at Object.<anonymous> (/home/ubuntu/testenvoy/controllers/test/all.js:2:17)

    at Module._compile (module.js:409:26)

    at Object.Module._extensions..js (module.js:416:10)


How can I fix this error?


After downgrade nodejs version to Node v6.9.0, I am getting below error


        throw error;


WebDriverError: Firefox option was set, but is not a FirefoxOption: {}

Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'

System info: host: 'WIN-MT0KFAH3HJN', ip: '', 'Windows Server 2012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_112'

Driver info: driver.version: FirefoxDriver

    at WebDriverError (/home/ubuntu/

    at Object.checkLegacyResponse (/home/ubuntu/

    at parseHttpResponse (/home/ubuntu/

    at doSend.then.response (/home/ubuntu/

    at process._tickCallback (internal/process/next_tick.js:103:7)

From: Task: WebDriver.createSession()

    at Function.createSession (/home/ubuntu/

    at Function.createSession (/home/ubuntu/

    at createDriver (/home/ubuntu/

    at (/home/ubuntu/

    at Query._callback (/home/ubuntu/

    at Query.Sequence.end (/home/ubuntu/

    at Query._handleFinalResultPacket (/home/ubuntu/

    at Query.EofPacket (/home/ubuntu/

    at Protocol._parsePacket (/home/ubuntu/

    at Parser.write (/home/ubuntu/

1 Answer

0 votes
by (62.9k points)

npm i [email protected] did the trick for me.

P.S. also consider fixing that in your package.json if you have any.

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

30.4k questions

32.5k answers


108k users

Browse Categories