1

I installed protractor using

npm install -g protractor

and then I executed this command:

webdriver-manager update

next, I started it, it works fine and I see this message:

INFO - Selenium Server is up and running The problem is that when I try

protractor config.js

it doesn't work and I get this error:

[launcher] Process exited with error code 1

/usr/local/lib/node_modules/protractor/node_modules/q/q.js:155
            throw e;
                  ^
SyntaxError: Unexpected token )

.

I thought this is because protractor needs node version > 4.~ . So I checked mine I found 0.10.25 so I tried

sudo npm install -g n
sudo n 4.4.0 

THe installation worked and when I check node -v again it's still 0.10.25

Any help pleaase?!

another geek
  • 361
  • 4
  • 15

1 Answers1

0

You need to update this node link (credits):

sudo ln -sf /usr/local/n/versions/node/4.4.0/bin/node /usr/bin/node
Community
  • 1
  • 1
alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195