Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Quality Assurance Introduction to Selenium Test Drive Selenium Installation

Syntax Error for the first line of code

When i do const selenium = require("selenium-webdriver");

i get this error: bash: syntax error near unexpected token `('

this is happening in workspace

2 Answers

is it saying "unexpected token" on that exact one or "unexpected token near" that one?

Although this is over a year old someone may come across this like I did. The reason you see that error is you need to enter the Node REPL first by entering node at the treehouse:~/workspace$ prompt. Then the prompt will change from treehouse:~/workspace$ to >.