You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just provide prefix params in the generate command like: nx generate @schematics/angular:component test --project frontend --prefix app --dryRun nx generate @nrwl/angular:component test --project frontend --prefix app --dryRun
Property 'prefix' does not match the schema.
{
"type": "string",
"description": "The prefix to apply to the generated component selector.",
"alias": "p",
"oneOf": [
{
"maxLength": 0
},
{
"minLength": 1,
"format": "html-selector"
}
]
}'
Environment
Node : 14.15.0
OS : darwin x64
yarn : 1.22.10
nx : Not Found
@nrwl/angular : 11.0.20
@nrwl/cli : 11.0.20
@nrwl/cypress : 11.0.20
@nrwl/devkit : 11.0.20
@nrwl/eslint-plugin-nx : 11.0.20
@nrwl/express : Not Found
@nrwl/jest : 11.0.20
@nrwl/linter : 11.0.20
@nrwl/nest : 11.0.20
@nrwl/next : Not Found
@nrwl/node : 11.0.20
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 11.0.20
@nrwl/web : Not Found
@nrwl/workspace : 11.0.20
typescript : 4.0.3
The text was updated successfully, but these errors were encountered:
Current Behavior
when generating a new angular component I get this error:
Property 'prefix' does not match the schema.
I traced the issue it's caused by
@nrwl/tao
when it tries to validate the options:nx/packages/tao/src/shared/params.ts
Line 222 in fb3af90
The thing is as the prefix is
oneOf
rule and each item doesn't containtype
property since it depends on the main rule typenx/packages/tao/src/shared/params.ts
Lines 210 to 216 in fb3af90
Expected Behavior
Generate component successfully
Steps to Reproduce
Just provide
prefix
params in the generate command like:nx generate @schematics/angular:component test --project frontend --prefix app --dryRun
nx generate @nrwl/angular:component test --project frontend --prefix app --dryRun
or set a default value for it from
angular.json
:Failure Logs
Environment
The text was updated successfully, but these errors were encountered: