I am working on Angular 6 application and trying to use CLI to create new component using 'ng g c myComponent' but getting error
My all components are under module folder of app / (root level component)
error
Could not find an NgModule. Use the skip-import option to skip importing in NgModule.
warning message
 Your global Angular CLI version (7.2.2) is greater than your local
 version (6.2.9). The local Angular CLI version is used.
 To disable this warning use "ng config -g cli.warnings.versionMismatch 
 false".
 Two or more projects are using identical roots. Unable to determine 
 project using current working directory. Using default workspace project 
 instead.
when I run ng --version, I get following app versions
Angular CLI: 6.2.9
Node: 8.9.3
OS: win32 x64
Angular: 5.2.11
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.8
@angular-devkit/build-angular     0.6.8
@angular-devkit/build-optimizer   0.6.8
@angular-devkit/core              0.6.8
@angular-devkit/schematics        0.8.9
@angular/cli                      6.2.9
@ngtools/webpack                  6.0.8
@schematics/angular               0.8.9
@schematics/update                0.8.9
rxjs                              5.5.12
typescript                        2.5.3
webpack                           4.8.3