This is partially based on the code used by npm internally to resolve the global prefix. Usage var prefix = require('{%= name %}'); //=> '/usr/local' (this path will differ by system and user-defined config)