async getPackageInfo(pkgName, tag, withFallback) {
    try {
      const result = await urllib.request(`${this.registryUrl}/${pkgName}`, {
        dataType: 'json',
        followRedirect: true,
      });
      const info = result.data;

      if (tag && info['dist-tags'] && info['dist-tags'][tag]) {
        const version = info['dist-tags'][tag];
        return info.versions[version];
      }
      throw new Error('Package not found');
    } catch (err) {
      if (withFallback) {
        log.warn(`use fallback from ${pkgName}`);
        return require(`${pkgName}/package.json`);
      }
      throw err;
    }
  }
get package info from registry

@param {String} pkgName package name
@param {String} tag package tag
@param {Boolean} [withFallback] when http request fail,
  whether to require local
@return {Object} pkgInfo