question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@nrwl/angular:component error in v14.6.* and v14.7.*

See original GitHub issue

Current Behavior

I can’t generate component using @nrwl/angular:component.

Expected Behavior

Generate angular component successfully.

Steps to Reproduce

  1. npx create-nx-workspace test
  2. choose angular-nest
  3. run nx g nrwl/angular:library reproduce / nx g lib reproduce
  4. In libs/reproduce/src/lib run nx 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:closed
  • Created a year ago
  • Reactions:1
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
leosvelperezcommented, Sep 13, 2022

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. The project will be inferred from the path in those cases. If you do provide --project and --path, we’ll check whether the path is contained inside the project root.

1reaction
Coly010commented, Sep 12, 2022

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found