Skip to content

Can't generate new component #11688

Closed
@mackelito

Description

@mackelito

Bug Report or Feature Request (mark with an x)

- [ x ] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ x ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

node --version
v8.11.2

ng --version

Angular CLI: 6.1.1
Node: 8.11.2
OS: darwin x64
Angular: 6.1.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker

Package Version

@angular-devkit/architect 0.6.5
@angular-devkit/build-angular 0.6.5
@angular-devkit/build-optimizer 0.6.5
@angular-devkit/core 0.7.1
@angular-devkit/schematics 0.7.1
@angular/cdk 6.4.1
@angular/cli 6.1.1
@angular/flex-layout 6.0.0-beta.15
@angular/material 6.4.1
@angular/pwa 0.6.8
@ngtools/webpack 6.0.5
@schematics/angular 0.6.8
@schematics/update 0.7.1
rxjs 6.2.2
typescript 2.9.2
webpack 4.8.3

Repro steps

cd to myModule/components..
run: ng generate component Item

The log given by the failure

Two or more projects are using identical roots. Unable to determine project using current working directory. Using default workspace project instead.
newTree.optimize is not a function

Desired functionality

Component should have been generated

Mention any other details that might be useful

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions