When I attempt to generate a component in VS Code using the Nx Console extension v14.0 I get the following error (see failure log below) even though I am selecting a project from the dropdown.
I am however able to generate a component if I use the terminal commands vs. the extension UI.
yarn generate:comp --name="switch" --project="common-components" --export --pascalCaseFiles
I expect the dry run to work correctly and not display errors.
This is a regression, it worked fine a couple weeks ago.
Create a site with multiple projects, attempt to generate a component using the extension.
> Executing task: nx generate @nrwl/react:component --name=switch --export --pascalCaseFiles --no-interactive --dry-run <
Schematic input does not validate against the Schema: {"style":"scss","name":"switch","export":true,"pascalCaseFiles":true}
Errors:
Data path "" should have required property 'project'.
The terminal process "/bin/bash '-l', '-c', '/Users/MatthewHaff/_work/lisbon-evolution/ui/webserver/node_modules/.bin/nx generate @nrwl/react:component --name=switch --export --pascalCaseFiles --no-interactive --dry-run', 'nx generate @nrwl/react:component --name=switch --export --pascalCaseFiles --no-interactive --dry-run'" terminated with exit code: 1.
Mac OS X 10.15.6
@nrwl/angular : Not Found
@nrwl/cli : 9.6.0
@nrwl/cypress : 9.6.0
@nrwl/eslint-plugin-nx : 9.6.0
@nrwl/express : Not Found
@nrwl/jest : 9.6.0
@nrwl/linter : 9.6.0
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/react : 9.6.0
@nrwl/schematics : Not Found
@nrwl/tao : 9.6.0
@nrwl/web : 9.6.0
@nrwl/workspace : 9.6.0
typescript : 3.8.3
I have encountered this same issue, on v10.2.1.
@vsavkin this isn't happening in the console, it's happening in the VS Code extension for NX. I am able to correctly generate a component in the console.
Good point, it's probably more appropriate to move it to this repo: https://github.com/nrwl/nx-console
Looks like they may have already fixed this in 14.0.1:
https://github.com/nrwl/nx-console/commit/8910bca4ad5a8811d1a5e1ff2501b8a446463613
@s4m0r4m4 that resolved it for me, thank you!
@CWSites , cool. I'd say we're good to close this issue out then!