For me the problem was because of global @angular/cli version and @angular/compiler-cli were different. Look into package.json.
...
"@angular/cli": "6.0.0-rc.3",
"@angular/compiler-cli": "^5.2.0",
...
And if they don’t match, update or downgrade one of them.