I think it's the docs again. Configure takes an Action, which is a function which is supposed to return void, and this lambda is trying to return a value.
Use
.Configure(c => c.LifestylePerWebRequest())
or as it doesn't look like you're planning to use different lifestyles for different components you can just apply the lifestyle without using Configure:
.Where(type => type.Name.EndsWith("Repository"))
.WithService.DefaultInterfaces()
.LifestylePerWebRequest());