@nrwl/angular:component error in v14.6.* and v14.7.*
See original GitHub issueCurrent Behavior
I can’t generate component using @nrwl/angular:component
.
Expected Behavior
Generate angular component successfully.
Steps to Reproduce
npx create-nx-workspace test
- choose
angular-nest
- run
nx g nrwl/angular:library reproduce
/nx g lib reproduce
- In
libs/reproduce/src/lib
runnx g @nrwl/angular:component reproduce
/nx g component reproduce
Failure Logs
> NX The path provided for the component (libs/reproduce/src/lib) does not exist under the project root (apps/my-app). Please make sure to provide a path that exists under the project root.
Environment
Node : 14.18.1
OS : win32 x64
npm : 6.14.15
nx : 14.6.5
@nrwl/angular : 14.6.5
@nrwl/cypress : 14.6.5
@nrwl/detox : Not Found
@nrwl/devkit : 14.6.5
@nrwl/eslint-plugin-nx : 14.6.5
@nrwl/express : Not Found
@nrwl/jest : 14.6.5
@nrwl/js : 14.6.5
@nrwl/linter : 14.6.5
@nrwl/nest : 14.6.5
@nrwl/next : Not Found
@nrwl/node : 14.6.5
@nrwl/nx-cloud : 14.6.1
@nrwl/nx-plugin : Not Found
@nrwl/react : Not Found
@nrwl/react-native : Not Found
@nrwl/schematics : Not Found
@nrwl/storybook : 14.6.5
@nrwl/web : 14.6.5
@nrwl/workspace : 14.6.5
typescript : 4.7.3
---------------------------------------
Local workspace plugins:
---------------------------------------
Community plugins:
@nguniversal/express-engine: 14.1.0
@nguniversal/builders: 14.1.0
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:15 (6 by maintainers)
Top Results From Across the Web
14.6.4 can't generate an Angular component inside the library
Current Behavior Error message when I'm trying to generate a component Expected ... @nrwl/angular:component error in v14.6.* and v14.7.
Read more >Nx 14.2 — Angular v14, Storybook update, lightweight Nx and ...
Read all about the Angular v14 upgrade that comes with it, TypeScript and other 3rd party package upgrades, improved Angular CLI to Nx ......
Read more >Error when generating new component in Angular 14.7.13
I am in the folder where I want the 'board' component to be. It makes no difference if I run it in the...
Read more >Generating code using schematics - Angular
A schematic is a template-based code generator that supports complex logic. It is a set of instructions for transforming a software project by...
Read more >nrwl/angular - npm
This package is an Angular plugin for Nx. Getting Started. Creating an Nx Workspace. Using npx. npx create-nx-workspace.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just to clarify, when https://github.com/nrwl/nx/pull/11980 lands, you won’t need to provide
--project
if only the--path
is provided in the right place. Theproject
will be inferred from thepath
in those cases. If you do provide--project
and--path
, we’ll check whether thepath
is contained inside theproject
root.Duplicate of https://github.com/nrwl/nx/issues/11883
It is pretty straightforward to support this where you can just be in the same folder in the terminal as the project you want to generate the component in.
But ideally, the
--project
flag should be provided