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
Local workspace-generator does not work after update to nx@15.0.0 #12677
Comments
Workspace generators is configured by default to require a name. If you run the following, it will work:
The error isn't the greatest but we can fix this. I think a better error would be the following?
|
@FrozenPandaz, thank you for the answer and you are completely right - this was an error on my part when creating the repro. When creating a generator manually - the "name" property might not be specified, which ends up with the previous error. Does this mean that the name is now (since 15) a required property regardless of the schema and should be added to all workspace-generators? For our uses, we don't have a name property, since have separate workspace-generators for separate use cases. |
Would you mind to elaborate more on this one @FrozenPandaz ? There is no mention of such a thing in docs nor release changelog. Anyways workspace generator execution is indeed broken in nx 15 (it has nothing to do with missing Last workable state Nx 14.8.4 (its broken since 14.8.5 -> #12258) ping @meeroslav |
I have same issue here.
|
We have the same issue on Nx v |
We have exactly the same error after upgrading to NX 15.0.1 (from 14.8.2) and after removing the following lines from if (options.length) {
command += ' (options)';
} We also have another issue with local workspace-generators that has no properties object in the schema.json, because of missing error handling it throws the following error: I am happy to raise a pull request for both issues. |
Seems that it isn't working since ver 14.8.5
|
Same here. |
Sorry folks for this issue. As @bridzius found out, the missing The issue that @Hotell found comes from invalid I'll get to it asap. |
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. |
Current Behavior
npx nx workspace-generator <name> <options>
fails withThe error happens due to a recent change in
nx
, where(option)
is appended to the command if there are options specified.Converting https://github.com/nrwl/nx/blob/master/packages/nx/src/command-line/nx-commands.ts#L841
from
if(options.length)
toif(!options.length)
seems to fix the issue.I can try creating a PR if that helps.
Expected Behavior
npx nx workspace-generator <name> <options>
should launch the generator and generate the required code.Steps to Reproduce
Reproduction in https://github.com/bridzius/workspace-generator-repro
Clone,
npm ci
, runnpx nx workspace-generator generato --all
. Should run the generator, but fails with said error.Failure Logs
Environment
The text was updated successfully, but these errors were encountered: