function createClbk( idx ) {
		var name = pkgs[ idx ];
		var k = idx + 1;

		return onResolve;

		/**
		* Callback to be invoked upon resolving a package.
		*
		* @private
		* @param {(Error|null)} error - error object
		* @param {string} main - main entry point
		* @param {Object} [pkg] - `package.json` contents
		* @returns {void}
		*/
		function onResolve( error, main ) {
			if ( errFLG ) {
				return;
			}
			if ( error ) {
				debug( 'Encountered an error while resolving package: %s (%d of %d). Error: %s', name, k, len, error.message );
				errFLG = true;
				return clbk( error );
			}
			debug( 'Resolved package: %s (%d of %d). Main: %s.', name, k, len, main );
			out[ idx ].main = main;
			count += 1;
			debug( 'Resolved %d of %d packages.', count, len );
			if ( count === len ) {
				debug( 'Resolved all packages.' );
				return clbk( null, out );
			}
		}
	}
Returns a callback to be invoked upon resolving a package.

@private
@param {NonNegativeInteger} idx - index
@returns {Callback} callback