I am using the following breadcrum sample. I have deployed the latter to app catalog and it works fine in a developer site with modern pages/library but it doesn't work in a modern team site.
I figured it out,the element.xml file is the key. It is found in sharepoint-->assets-->element.xml
This means that the application will be deployed using feature configuration and NEEDS TO BE ADDED TO EACH SITE MANUALLY HENCE WHEN ADDING THE PACKAGE TO APP CATALOG DO NOT CHECK THE BOX FOR DEPLOYMENT TO THE WHOLE TENANT
Link to explanation