I'm trying to generate a new component in an Angular library in my repo. I'm having another issue which I made another question about but that led to me updating node then reinstalling NX with the following commands
npm i -g nx
Then I ran
npm i -g @nx/cli
When I try to generate a component by doing this
nx g @nx/angular:component main-menu/main-menu --project=ingredient-manager
I get an error saying
'project' is not found in schema
It doesn't matter what directory I'm in in the terminal, I get this message. I initially took it as meaning --project
isn't a recognized option so I ran nx --help
and as I scrolled down I saw it listed. So I started thinking maybe it meant ingredient-manager
wasn't found in the schema. I looked in my tsconfig.base.json
file to be sure I didn't accidentally delete something some type of way but everything was fine and I do indeed see the library registered. The only other thing I could think is maybe for some reason we need to include the paths so I tried setting --project
to @myProject/myLibrary
as it's registered in the tsconfig.base.json
file and I also tried @myProject/libs/apps/myLibrary
and just libs/apps/myLibrary
and got the same error each time. I don't understand what I'm doing wrong. I tried reinstalling node and nx because prior I had to do npx nx g @nx/whatever
in order to do anything. Does anybody know why this is happening?