I'm creating a custom widget with ArcGIS JS 4.16 using this example:
Custom Recenter Widget | ArcGIS API for JavaScript 4.16
EDIT:
I get these warning messages in DevTools when I run the map containing the widget.

When I click on .(index):115 the ArcGis JS 4.16 index file appears, so I think that it's not my code causing these messages, but is actually a bug in the API. Can anyone confirm this?