The following error started occurring after adding a few components.

Unexpected value ‘undefined’ declared by the module ‘AppModule’

Commenting out the changes did not fix the issue. Stopping ng serve and restarting it fixed the bug. It looks like something got abit out of sync and a simple turn it off and on again was required