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 More Locator Strategies

Error after pasting Environment Variable, typing 'node', then pasting const selenium = require("selenium-webdriver");

Hello all,

Following this video, and having so far added my environment variable which worked fine, but then added the terminal command exactly as copied from the teachers notes

'const selenium = require("selenium-webdriver");' - at this point I get an error message in the terminal as follows:

'''henry@Henrys-MBP ~ $ URL=http://port-80-vx3nov8yl3.treehouse-app.com/ node

const selenium = require("selenium-webdriver"); { Error: Cannot find module 'selenium-webdriver' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15) at Function.Module._load (internal/modules/cjs/loader.js:508:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) code: 'MODULE_NOT_FOUND' } '''

Has anybody else encountered this issue? I checked in my node_modules directory, and selenium-webdriver appears to be in the directory currently - some advice in fixing this issue would be much appreciated,

Many Thanks