This problem happens, try to adding listener not existing html object.
if too many listener you have and you cant found which element not exist, debug jquery file after beauty format.
in jquery file, find dispatch function. at second dimension for loop statement add OR operator and log t variable;
|| console.log(t)
for (t.currentTarget = o.elem, i = 0;
(r = o.handlers[i++]) && !t.isImmediatePropagationStopped();)(!t.namespace_re || t.namespace_re.test(r.namespace)) && (t.handleObj = r, t.data = r.data, s = ((p.event.special[r.origType] || {}).handle || r.handler).apply(o.elem, l) || console.log(t), void 0 !== s && (t.result = s) === !1 && (t.preventDefault(), t.stopPropagation()));
Read last throwed console response before error. It's help find which element not exist in html doc.

Finally check html obj exist in doc with jquery, problem will be solved.
if($('.cartProduct .close-button').length>0)
$('.cartProduct .close-button').click(function{
});
undefined
function insideclick
event handler