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
NX The selector "lib-auth/common" is invalid.
Error: The selector "lib-auth/common" is invalid.
at validateHtmlSelector (/mnt/Storage/Development/angular/nx-20-angular-lib-generation/node_modules/@nx/angular/src/generators/utils/selector.js:18:15)
at normalizeOptions (/mnt/Storage/Development/angular/nx-20-angular-lib-generation/node_modules/@nx/angular/src/generators/component/lib/normalize-options.js:21:41)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async componentGenerator (/mnt/Storage/Development/angular/nx-20-angular-lib-generation/node_modules/@nx/angular/src/generators/component/component.js:9:21)
at async addStandaloneComponent (/mnt/Storage/Development/angular/nx-20-angular-lib-generation/node_modules/@nx/angular/src/generators/library/lib/add-standalone-component.js:9:5)
at async libraryGenerator (/mnt/Storage/Development/angular/nx-20-angular-lib-generation/node_modules/@nx/angular/src/generators/library/library.js:62:9)
at async /mnt/Storage/Development/angular/nx-20-angular-lib-generation/node_modules/nx/src/command-line/generate/generate.js:240:26
at async handleErrors (/mnt/Storage/Development/angular/nx-20-angular-lib-generation/node_modules/nx/src/utils/handle-errors.js:8:24)
at async Object.handler (/mnt/Storage/Development/angular/nx-20-angular-lib-generation/node_modules/nx/src/command-line/generate/command-object.js:13:22)
Package Manager Version
1.22.22
Operating System
macOS
Linux
Windows
Other (Please specify)
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Fafnur
changed the title
Generating @nx/angular:library with the name parameter fails with an error - Еhe selector is invalid.
Generating @nx/angular:library with the name parameter fails with an error - The selector is invalid.
Dec 7, 2024
## Current Behavior
When passing a project name with a `/` in it to the library generator,
this name passes through to the `component` generator.
The `component` generator may then attempt to build a selector from this
name, however, it does not normalize the `/`.
## Expected Behavior
Ensure the `/` is normalized from the name when building the selector
## Related Issue(s)
Fixes#29229
## Current Behavior
When passing a project name with a `/` in it to the library generator,
this name passes through to the `component` generator.
The `component` generator may then attempt to build a selector from this
name, however, it does not normalize the `/`.
## Expected Behavior
Ensure the `/` is normalized from the name when building the selector
## Related Issue(s)
Fixes#29229
Current Behavior
You will get an error if you try to generate an Angular library with a name that includes a slash.
Try run:
The issue lies with the selector name.
Error: The selector "lib-auth/common" is invalid.
Expected Behavior
It is expected that a library should be created when a slash is included in its name.
The Nx command should handle slashes by replacing them with dashes in selectors.
GitHub Repo
https://github.com/Fafnur/nx-20-angular-lib-generation
Steps to Reproduce
Nx Report
Failure Logs
Package Manager Version
1.22.22
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: