I get the error in the subject of this post when I use the CLI to create a new component: ng g c my-component --project=my-project
(No component is created)
I've seen other posts with the same error message, but none of them also include Nrwl/Nx, which I believe is somehow involved. Project started as Ng4 and was upgraded to Ng6.
Any ideas how I can fix this?
Thx.
TTE
Environment:
- Angular CLI: 6.0.8
- Node: 8.9.4
- OS: win32 x64
- Angular: 6.0.6
- @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.6.8
- @angular/cdk 6.3.1
- @angular/cli 6.0.8
- @angular/material 6.3.1
- @ngtools/webpack 6.0.8
- @schematics/angular 0.6.1
- @schematics/update 0.6.8
- rxjs 6.2.1
- typescript 2.7.2
- webpack 4.8.3
- nrwl/nx 6.1.0
UPDATE #1
I tried dropping the --project
flag entirely ( so just ng g c my-component
) and still get the same problem. Not sure what that means, yet.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…