function resolveDependencyFrom(cwd, moduleId) {
  return path.dirname(
    Module.createRequire(path.join(cwd, 'index.js')).resolve(
      `${moduleId}/package.json`
    )
  )
}
Resolves a module's installation path (_not_ entry point) from some other
directory.

@param {string} cwd - Some other directory
@param {string} moduleId - Module to resolve
@returns {string} Resolved dir path