code: function pkgPath(pkg) {
      pkg = pkg.pkg || pkg;
      var pkgPath = npmResolve(pkg, { basedir:opts.basedir, paths:builtins } );
      if (!pkgPath) throw new Error('cannot resolve module ' + pkg);
      return pkgPath;
    }
docs: resolve package path given package name or {pkg:name}