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

Cannot find module 'Cannot find module 'selenium-webdriver'

I'm getting the following error, when I type '> const selenium = require("selenium-webdriver");' -

Error: Cannot find module 'selenium-webdriver' at Function.Module._resolveFilename (module.js:547:15) at Function.Module._load (module.js:474:25) at Module.require (module.js:596:17) at require (internal/module.js:11:18)

HELP

4 Answers

Thanks for your reply Brendan Whiting . Yep that was the previous command and I get a whole bunch errors -

npm WARN checkPermissions Missing write access to /Users/festusifiti/node_modules/selenium-webdriver npm WARN enoent ENOENT: no such file or directory, open '/Users/festusifiti/package.json' npm WARN festusifiti No description npm WARN festusifiti No repository field. npm WARN festusifiti No README data npm WARN festusifiti No license field.

npm ERR! path /Users/festusifiti/node_modules/selenium-webdriver npm ERR! code ELOOP npm ERR! errno -62 npm ERR! syscall access npm ERR! ELOOP: too many symbolic links encountered, access '/Users/festusifiti/node_modules/selenium-webdriver'

npm ERR! A complete log of this run can be found in: npm ERR! /Users/festusifiti/.npm/_logs/2019-02-12T15_31_04_959Z-debug.log

Brendan Whiting
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Brendan Whiting
Front End Web Development Techdegree Graduate 84,704 Points

Are you trying to install globally or locally? If global, try with sudo. If local, check that it's in your package.json. You can also try deleting and reinstalling your node_modules.

Hey Brendan so I uninstalled everything and tried to install selenium webdriver and I received a lot of errors -

npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/immediate-d40a5f7b/dist'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/lie-27335f6a/dist'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/sax-16e84e27/lib'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/es6-promise-812d6b92/dist'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/concat-map-03ec3fc3/example'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/pako-3c5a531b/dist'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/xml2js-c2ce3b2d/lib'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-util-is-f15f1320/lib'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/immediate-d40a5f7b/lib'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/xmlbuilder-d0546d54/lib'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/tmp-66693a22/coverage'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/concat-map-03ec3fc3/test'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/readable-stream-080cd331/lib'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/es6-promise-812d6b92/lib'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/tmp-66693a22/coverage/lcov-report'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/lie-27335f6a/lib'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/es6-promise-812d6b92/lib/es6-promise'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/jszip-472d8ca1/dist'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/es5'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/tmp-66693a22/coverage/lcov-report/lib'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/build'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/es6-promise-812d6b92/lib/es6-promise/promise'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/client'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/readable-stream-080cd331/doc'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/jszip-472d8ca1/lib'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/firefox'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/tmp-66693a22/lib'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/readable-stream-080cd331/doc/wg-meetings'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/tmp-66693a22/test'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/jszip-472d8ca1/lib/generate'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/io'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/pako-3c5a531b/lib'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/jszip-472d8ca1/lib/nodejs'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/net'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/pako-3c5a531b/lib/utils'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/jszip-472d8ca1/lib/reader'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/tmp-66693a22/test/symlinkme'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/http'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/pako-3c5a531b/lib/zlib'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/jszip-472d8ca1/lib/stream'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/jszip-472d8ca1/vendor'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/core'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/es6'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/child'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/es7'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/child/grandchild'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/click_tests'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn/error'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn/object'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/coordinates_tests'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/css/ui-lightness/images'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn/math'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn/reflect'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/firefox'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn/regexp'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/frame_switching_tests'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn/json'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn/function'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/html5'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn/function/virtual'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn/array'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/js'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn/array/virtual'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn/dom-collections'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/js/skins/lightgray'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn/string'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/js/skins/lightgray/fonts'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn/string/virtual'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/js/skins/lightgray/img'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/js/themes/modern'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/key_tests'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/locators_tests'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn/symbol'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn/system'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn/typed'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/modal_dialogs'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/overflow'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn/date'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn/number'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/proxy'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/fn/number/virtual'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/safari'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/screen'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/core'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/scrolling_tests'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/es5'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/es6'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/es7'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/test/data/window_switching_tests'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/lib/atoms'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/example'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn/error'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn/object'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/remote'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/test'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn/math'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/test/phantomjs'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/test/chrome'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/test/net'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/test/lib'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn/reflect'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn/regexp'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/test/io'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn/json'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/test/http'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn/function'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/test/testing'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/test/firefox'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn/function/virtual'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/selenium-webdriver-808d9d19/testing'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn/array'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn/array/virtual'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn/dom-collections'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn/string'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn/string/virtual'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn/symbol'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn/system'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn/typed'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn/date'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn/number'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/fn/number/virtual'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/modules'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/stage'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/library/web'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/modules'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/modules/library'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/stage'
npm WARN tar EISDIR: illegal operation on a directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/node_modules/.staging/core-js-bda4e87a/web'
npm WARN saveError ENOENT: no such file or directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/Users/festusifiti/Documents/Projects/selenium-basics/package.json'
npm WARN selenium-basics No description
npm WARN selenium-basics No repository field.
npm WARN selenium-basics No README data
npm WARN selenium-basics No license field.

+ selenium-webdriver@3.6.0
added 30 packages from 69 contributors and audited 34 packages in 2.075s
found 0 vulnerabilities

Then I tried to install the chrome driver globally and again errors -

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/chrome-driver - Not found
npm ERR! 404
npm ERR! 404  'chrome-driver@latest' is not in the npm registry.
npm ERR! 404 Your package name is not valid, because
npm ERR! 404  1. name can only contain URL-friendly characters
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/festusifiti/.npm/_logs/2019-02-13T13_57_02_355Z-debug.log

I'm just getting errors willy nilly :(

I managed to resolve the issue by not sudo-ing npm, i didn't know that it was bad - https://medium.com/@ExplosionPills/dont-use-sudo-with-npm-still-66e609f5f92

Many thanks for your help Brendan Whiting .