Usage Path varies by platform. const yarnModules = require('{%= name %}'); console.log(yarnModules()); //=> '/Users/jonschlinkert/.config/yarn/global'