nodejs, protractor, Uncategorized

SyntaxError: Unexpected token while working with protractor on local machine

info(...msgs) {
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:414:25)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (D:\gramLabs\code\Protractor\gramLabs\node_modules\protractor\built\configParser.js:6:18)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)


  • Make sure node js is installed on local machine.
  • Make sure npm is installed on local machine.
  • Make sure protractor is installed on local machine.


  • Make sure PATH variable has npm.


In eclipse, check the node js has proper version and is pointing to the latest or node 4 above version.

  • Open eclipse –> Window –> Preferences –> AngularJS –> Protractor.
  • Now node.js install –> Node.js path , here check the path which is mentioned and go to this directory path.


Now, where ever you have your latest node installed on local machine, copy the node directories on this location. For example from Program Files–Nodejs to the location which eclipse is showing.



Now, refresh , clean and restart the eclipse.

It should work.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s