function onResolve( error, main ) {
		if ( FLG ) {
			// Stop any further processing if currently in an error state...
			return;
		}
		if ( error ) {
			debug( 'Encountered an error when resolving module dependency: %s. Error: %s', file, error.message );
			FLG = true;
			return clbk( error );
		}
		debug( 'Successfully resolved module dependency for file: %s. Dep: %s', file, main );

		debug( 'Checking for a module substitution for file: %s...', main );
		if ( hasOwnProp( options.aliases, main ) ) {
			debug( 'Found a module substitution for file: %s. Substitution: %s.', main, options.aliases[ main ] );
			main = options.aliases[ main ];
		} else {
			debug( 'No module substitution found for file: %s.', main );
		}

		debug( 'Walking module dependency: %s...', main );
		walk( cache, main, options, onWalk );
	}
Callback invoked upon resolving a module.

@private
@param {(Error|null)} error - error object
@param {string} main - file path
@returns {void}