import path from 'path' ; /**
 * Finds a path inside `node_modules`
 */ export default function resolveNodeModuleDir ( root , packageName ) { return path . dirname ( require . resolve ( path . join ( packageName , 'package.json' ) , { paths : [ root ] , } ) ) ; }