angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

CLI v6.0.0 failing to generate components - unable to locate module

Open SamScholefield opened this issue 8 years ago • 2 comments

Versions

Angular CLI: 6.0.0
Node: 8.9.1
OS: darwin x64
Angular: 6.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.0
@angular-devkit/build-angular     0.6.0
@angular-devkit/build-optimizer   0.6.0
@angular-devkit/core              0.6.0
@angular-devkit/schematics        0.6.0
@ngtools/webpack                  6.0.0
@schematics/angular               0.6.0
@schematics/update                0.6.0
rxjs                              6.1.0
typescript                        2.7.2
webpack                           4.6.0

Repro steps

ng new my-project
cd my-project
ng g c my-component --m app

Observed behavior

Terminal output:

Could not find an NgModule. Use the skip-import option to skip importing in NgModule.

Desired behavior

Component folder/files generated in ./src/app
Component imported in `app.module.ts'

SamScholefield avatar May 08 '18 12:05 SamScholefield

Duplicate of #10653

clydin avatar May 08 '18 14:05 clydin

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.