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

Setting multiple tags throws: Schema does not support positional arguments #1965

Open
Tom4U opened this issue Dec 15, 2023 · 2 comments
Open
Labels
blocked: more info needed more info needed type: bug Something isn't working

Comments

@Tom4U
Copy link

Tom4U commented Dec 15, 2023

Current Behavior

Running an UI generator that provides tags field throws error Schema does not support positional arguments. if multiple tags are defined.

This only happens if tags are comma separated and space is set after comma. Without space it would work, but than it's not passed as string and only first tag is used.

Question remains if there's a specific format to use in form field.

However, if using the first approach and picking up the generated command, running it manually on console, it works fine. So something seems to pass something in.

Expected Behavior

Multiple, comma separated tags, should be passed to nx generate command as it would be if running it manually.

Steps to Reproduce

  1. Run a UI generator for an app or library that uses -tags argument.
  2. Set multiple tags like tag1, tag2
  3. Monitor dry run output in console.

Failure Logs / Images / Videos

Command generated: nx g @nx/nest:application --name=api --frontendProject=ui --directory=apps/api --projectNameAndRootFormat=as-provided --tags="tag1, tag2"

Error thrown if running through UI: > NX Schema does not support positional arguments. Argument 'tag2' found

Environment

   Node   : 20.9.0
   OS     : win32-x64
   npm    : 10.2.5

   nx (global)        : 17.2.3
   nx                 : 17.2.3
   @nx/js             : 17.2.3
   @nx/jest           : 17.2.3
   @nx/linter         : 17.2.3
   @nx/eslint         : 17.2.3
   @nx/workspace      : 17.2.3
   @nx/angular        : 17.2.3
   @nx/cypress        : 17.2.3
   @nx/devkit         : 17.2.3
   @nx/eslint-plugin  : 17.2.3
   @nx/nest           : 17.2.3
   @nx/node           : 17.2.3
   @nx/playwright     : 17.2.3
   @nrwl/tao          : 17.2.3
   @nx/web            : 17.2.3
   @nx/webpack        : 17.2.3
   typescript         : 5.2.2
  • Nx Console version: 18.10.1
  • VSCode version: 1.85.1
@Tom4U Tom4U added the type: bug Something isn't working label Dec 15, 2023
@MaxKless
Copy link
Collaborator

Do you have a minimal repro for me to use?
I tried this on both my mac and windows laptop and it worked the same from the CLI and from nx console generate ui...
and the command looks correct too, doesn't it?

@MaxKless MaxKless added the blocked: more info needed more info needed label Dec 15, 2023
@Tom4U
Copy link
Author

Tom4U commented Dec 16, 2023

While trying to reproduce it on a new workspace I've noticed the following:

Using tag1, tag2

  • @nx/web:application no error, but only first tag is used
  • @nx/js:library no error, but only first tag is used
  • @nx/angular:application no dry-run preview in terminal, throws error
  • @nx/nest:application throws error

Here's the repo I've tested on: tmp-nx-console-issue-tags

And just to be sure, here's a list of all extensions currently in that VS Code instance:

Angular.ng-template
austenc.tailwind-docs
bradlc.vscode-tailwindcss
cyrilletuzi.angular-schematics
dbaeumer.vscode-eslint
deniszholob.angular-files-generator
eamodio.gitlens
esbenp.prettier-vscode
firsttris.vscode-jest-runner
hbenl.vscode-test-explorer
miclo.sort-typescript-imports
mrmlnc.vscode-scss
ms-azure-devops.azure-pipelines
MS-CEINTL.vscode-language-pack-de
ms-playwright.playwright
ms-vscode-remote.remote-wsl
ms-vscode.azure-account
ms-vscode.live-server
ms-vscode.test-adapter-converter
nrwl.angular-console
Orta.vscode-jest
ryanluker.vscode-coverage-gutters
softwaredotcom.swdc-vscode
SonarSource.sonarlint-vscode
syler.sass-indented
vivaxy.vscode-conventional-commits
zerotask.firebase-configuration-schema

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: more info needed more info needed type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants