Issue #1672 fixed a number of problems, but several components seem to have been left out of that set of fixes. These listener calls also need checks to ensure that the listeners exist before they are called during destroy:
https://github.com/primefaces/primeng/blob/f512363fb20df8b01f87a9cf3638dd55432146ca/components/confirmdialog/confirmdialog.ts#L223
https://github.com/primefaces/primeng/blob/f512363fb20df8b01f87a9cf3638dd55432146ca/components/confirmdialog/confirmdialog.ts#L227
https://github.com/primefaces/primeng/blob/b16e3460e247c5fae68d7d520061ecaca55fe9b3/components/carousel/carousel.ts#L308
https://github.com/primefaces/primeng/blob/2ce2f9749308dbf2afe62af8dd48f4e0499227e3/components/contextmenu/contextmenu.ts#L241
https://github.com/primefaces/primeng/blob/2ce2f9749308dbf2afe62af8dd48f4e0499227e3/components/contextmenu/contextmenu.ts#L243
399e7b6 doesn't contain fix for the context menu component
Most helpful comment
Please see;
https://github.com/primefaces/primeng/issues/2349