How can I get the path to global npm_modules in javascript?
From the command line, I can get the base path to the npm modules by calling this:
npm config get prefix
How can I get this path in javascript file? Is there any module that I can use to get this path?
I am trying to set up a protractor.config.js file to specify paths for seleniumServerJar and chromeDriver (which are installed globally), and I need to know the path to the npm global modules so that I can specify these paths.
source
share