docs: function getInstalledPathSync (name, opts) {
    if (!isValidString(name)) {
      throw new TypeError('get-installed-path: expect `name` to be string')
    }
  
    const filePaths = defaults(name, opts)
    const firstPath = filePaths[0]
    const modulePath = filePaths.find((filePath) => {
      let stat = null
  
      try {
        stat = fs.statSync(filePath)
      } catch (e) {
        return false
      }
  
      if (stat.isDirectory()) {
        return true
      }
  
      const msg = `Possibly "${name}" is not a directory: ${filePath}`
      throw new Error('get-installed-path: some error occured! ' + msg)
    })
  
    if (!modulePath) {
      const label = 'get-installed-path:'
      const msg = `${label} module not found "${name}" in path ${firstPath}`
      throw new Error(msg)
    }
  
    return modulePath
  }