I can able to run through locally. Getting error only in production build.
I have used
import { CommonModule } from \'@angular/common\'; imports:
Other solution if none of the above works is just to restart your ng serve, that worked for me. Or maybe try this method first before pulling your hairs out.
ng serve