Closed troywweber7 closed 3 years ago
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nrwl community! 🙏
This has been tagged twice, but now was marked stale and will be automatically closed. Is it being worked on or is it really stale? I understand it is a lower priority, hit below it gets closed, does anyone have some solid advice?
I can get it to work by using angular cli + angular.json, but it seems like a workaround and like workspace.json is the way to go in the future.
Any input/confirmation is appreciated.
I have the same issue with nx generate @nrwl/nest:application
(@nrwl/node:lib
works).
Is it a global problem or does it only happen on some configurations/setups?
Is there anything I can do to help debug it?
This issue occurs for schematics that are specifically looking for an angular.json
file within the workspace. This file doesn't exist for workspaces that don't use the Angular CLI.
@brandonroberts is there a way to let the NX cli check/override/mock the behavior, so you can still use ng add @angular/material
etc? Or in this case: nx add @angular/material
, nx add @datorama/akita
, etc
Currently working on a new projects which uses both Angular and React.
Started with an Empty workspace (with the default Nx cli) and added @nrwl/angular
and nrwl/react
It's a shame we can't use the beautiful Angular schematics anymore.
"NX ADD"
@angular/material @angular/fire
please
Hi @curiouscod3
Thanks, for trying to help.
How does adding @angualr/material
and @angular/fire
help with this particular problem?
We're already using @angular/material
NX CLI Has no ability "ADD" yet! Sorry..I mentioned to ask the core team adding the feature. is it possible? for me, no
This issue has been resolved in Nx 11. I went through the repro steps with only the workspace.json and no failures were reported
@brandonroberts Is this functionality supposed to work with libraries as well? Looks like it only works for apps folder at the moment.
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Prerequisites
Please answer the following questions for yourself before submitting an issue.
nx --version => 9.2.2
Expected Behavior
When using
workspace.json
(after creating a blank mono-repo), the following commands should all work:nx g @nrwl/angular:lib
nx g @angular/material:navigation
Current Behavior
(1) succeeds, but (2) fails. The only way to be able to run all successfully seems to be to move
workspace.json
toangular.json
(and make sure@angular/cli
is installed as well, at that point).Steps to Reproduce
Please provide detailed steps for reproducing the issue.
nx g @nrwl/angular:lib
nx g @angular/material:navigation
workspace.json
toangular.json
and try againContext
package.json
listed belowOther
I love Nx so far. I'm just looking for the quickest way to get up and running with the most usability and least pitfalls and I use this information to advise my coworkers on how and when to use Nx. It's that it would be preferable to use the Nx CLI over the Angular CLI, but Nx CLI does not appear to be able to run some schematics (i.e.
@angular/material:navigation
) without the presence of theangular.json
and therefore the Angular CLI. So feedback on this front is also welcome.Also, please note that normally, some of the deps I installed would normally be installed by a
ng add @angular/material
but there doesn't seem to be an Nx equivalent tong add
so I just installed only the necessary libraries and was still able to reproduce minimally.Thanks in advance for your help.