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 );
			}
		}
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}