How to fixed Uncaught TypeError: Constr is not a constructor Error in Magento?

Javascript console Uncaught TypeError: Constr is not a constructor error that will be seen when we have made some mistakes on the javascript file in Magento.

Error structure looks like,

I have faced the above error when I deal with Magento_Ui/js/core/app custom components in my module.

Now When you create favorite-products javascript file in your module,

I just forgot to return the function in the javascript file and throws that error on a console for me.

Resolution For Me:
Fixed by adding a return function in the custom js file.

You must have to return function when you call custom component using Magento 2 require js approach.