When I load pages on our live site (D9), we see these Modernizr errors from contextual links JS, and the contextual links don't appear on the site.
However, Modernizr does appear to be loaded ahead of the contextual links JS, as you can see from the two further screen captures, so I don't see why RegionView and VisualView should think it is undefined.
and also the Modernizr object is available in the JS console after page load
I have no idea how to progress solving this. To make things worse, this doesn't seem to happen on our test sites, which are running on the same codebase.
Modernizr
isn't defined.