Angular - TypeError: Cannot read property 'write' of undefined
Seems to be caused by latest version of Angular CLI (released today). I worked around it by installing previous version (6.0.8) globally.
Update:
As per prionp answer below:
Angular CLI v6.1.2 fixed the issue.
Update your version :
npm update -g @angular/cli
It's because of the new Angular version. Go with the old Angular version:
npm uninstall -g @angular/cli
npm install -g @angular/[email protected]