After updating Angular CLI to v6.0.0 and creating a new app using ng new my-app
I receive the following error when attempting to generate a component with ng g c my-component
:
Could not find an NgModule. Use the skip-import option to skip importing in NgModule.
This is the simple error returned in Terminal, VSCode gives a much more verbose error which i can paste if necessary!
I can find reference to this error here and have tried adjusting the 'root' value in 'angular.json' to both "" and "src" but with no success.
Any help greatly appreciated!
I opened a bug report for @angular/cli and it got merged into github.com/angular/angular-cli/issues/10653.
This issue appears to have been fixed in the 6.0.1 release.