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

NG CLI 6: ng generate put files in wrong place

Open matheusdavidson opened this issue 8 years ago • 6 comments

Versions

Angular CLI: 6.0.0
Node: 9.10.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

  • Step 1 Generate a new app: ng new angular --routing

  • Step 2 run: ng g module --routing test

Observed behavior

Files are generated in the wrong place, lets say your project root is: /var/www/project

Module test gets generated in: /var/www/project/var/www/project/test

Desired behavior

Expected test module to be generated in the right place: /var/www/project/src/app/test

Mention any other details that might be useful (optional)

I'm running latest NG 6, with latest NG CLI 6 on a MacOS High Sierra, other projects with NG 5 and NG CLI 1.7.4 works as expected

captura de tela 2018-05-05 as 22 22 07

matheusdavidson avatar May 06 '18 01:05 matheusdavidson

Same as #10653

matheusdavidson avatar May 06 '18 13:05 matheusdavidson

This is also happening on my machine.

johren02 avatar May 06 '18 19:05 johren02

A PR that is part of 6.0.1 will hopefully address this issue. @matheusdavidson can you please verify this one too?

Brocco avatar May 11 '18 13:05 Brocco

Sure, i”ll try that, thanks

matheusdavidson avatar May 11 '18 13:05 matheusdavidson

@Brocco, its working with 6.0.1, thank you!

matheusdavidson avatar May 11 '18 18:05 matheusdavidson

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.