Angular ERROR TypeError: Cannot read properties of undefined (reading ‘onDestroy’) April 12, 2024 by Tarik I had the same issue. Try to remove the .angular directory! worked for me.