When creating an openstreetmap geocoder, the following error is thrown:
'An User-Agent identifying your application is required for the OpenStreetMap / Nominatim provider when using the default host. Please add it in the "userAgent" option.'
But in the documentation it seems to be optional at least for openstreetmap.
The error is thrown from this constructor which is also exported as OpenStreetMapProvider (here).