Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property 'app' does not match the schema. 'false' should be a 'string'. #1324

Closed
christophglass opened this issue Aug 11, 2022 · 6 comments
Closed

Comments

@christophglass
Copy link

Using nx generate with VSC in version v17.20.0 I got following errors when trying to create a @angular-architects/ddd:feature:

npx nx generate @angular-architects/ddd:feature test --domain=test --directory=libs/anything --entity=test --ngrx --no-app --no-interactive --dry-run -> Property 'app' does not match the schema. 'false' should be a 'string'.

or

npx nx generate @angular-architects/ddd:feature test --domain=test --directory=libs/document --app=online-calculator --entity=test --ngrx --no-app --no-interactive --dry-run

=>

Property 'app' does not match the schema.
{
"type": "string",
"description": "app name"
}

Before last update this worked. Can anyone please tell me what Im doing wrong? Or ist it a bug?

Tanks in advance.

@AgentEnder
Copy link
Member

The feature generator from @angular-architects/ddd accepts only strings for --app, which it looks like you provided correctly. However, later in the command, you specify --no-app which is transformed to --app=false and overwrites your earlier specification.

I'd recommend not passing it, but I'm not sure if you are able to given the context of NX Console.

I'm going to transfer this issue to that repo, so that it may be worked on in that context.

@AgentEnder AgentEnder transferred this issue from nrwl/nx Aug 12, 2022
@MaxKless
Copy link
Collaborator

This works as with the latest versions of nx and @angular-architects/ddd. no-app is now noApp

@milanc
Copy link

milanc commented Dec 28, 2022

Hi @MaxKless
Could you please specify versions that are working.
I still have the same issue
nx 15.4.2
ddd 3.0.0
nx console v17.27.1

I do see that when run from command line with -noApp command is working fine, but nx console is still generating the flag as --no-app

@milanc
Copy link

milanc commented Jan 3, 2023

Btw I've just noticed that nx console generates flag as --no-app when angular.json is present in the repo.
Once angular.json is removed flag is generated as --noApp.

@MaxKless
Copy link
Collaborator

MaxKless commented Jan 9, 2023

That's a useful piece of info, thanks.
Looks like this happens because if this PR: #1304
The motivation behind this was that angular CLI doesn't like camel case flags like noApp.

Honestly using angular.json with Nx is not something we want to spend a lot more time & energy in. So I would recommend moving to separate project.json files instead. Check out how to here.

@milanc
Copy link

milanc commented Jan 9, 2023

Hi @MaxKless,
I already have migrated to project.json, some time ago following nx documentation which back then suggested keeping angular.json with pointers to these projects and setting version:2 in it.

But as I can see mono-repo works fine without angular.json so I assume it is not needed anymore.

Thank you again for looking into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants