Skip to content

"newProjectRoot": "./" throws error #14108

Closed
@rcketscientist

Description

@rcketscientist

🐞 Bug report

Command (mark with an x)

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

Description

For simple lib/demo use cases I would prefer to have a flat project
-demo
-lib

However, newProjectRoot: "./" will fail to generate new projects (at least on win).

🔬 Minimal Reproduction

ng new alloy-window-manager --newProjectRoot=./ --style=scss --createApplication=false
ng g library alloy-window-manager --prefix=awm

will generate this:

🔥 Exception or Error



Schematic input does not validate against the Schema: {"name":"alloy-window-manager","commonModule":false,"flat":true,"path":".//alloy-window-manager/src/lib","project":"alloy-window-manager"}
Errors:
Data path ".path" should match format "path".

"newProjectRoot": "" expects projects to be at the device root...
"newProjectRoot": "projects" works

🌍 Your Environment




Angular CLI: 7.1.4
Node: 10.14.2
OS: win32 x64
Angular: 7.1.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.11.4
@angular-devkit/core         7.1.4
@angular-devkit/schematics   7.1.4
@schematics/angular          7.1.4
@schematics/update           0.11.4
rxjs                         6.3.3
typescript                   3.1.6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions