Get the resolved path to the root of a package installed in node_modules
For Node.js projects, set the CWD (current working directory) to the same directory as package.json.
var root = require('module-root');
root('lodash');
//=> ~/your-project/node_modules/lodash
Jon Schlinkert
Copyright (c) 2014 Jon Schlinkert, contributors. Released under the MIT license