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

nx add @angular/localize fails with SchematicsException #22718

Closed
1 of 4 tasks
andav51 opened this issue Apr 7, 2024 · 1 comment · Fixed by #22855
Closed
1 of 4 tasks

nx add @angular/localize fails with SchematicsException #22718

andav51 opened this issue Apr 7, 2024 · 1 comment · Fixed by #22855
Assignees
Labels
outdated scope: angular Issues related to Angular support in Nx type: bug

Comments

@andav51
Copy link

andav51 commented Apr 7, 2024

Current Behavior

I am trying to use nx add to add localization to an angular app that is part of an nx workspace but the command fails with error SchematicsException [Error]: Option "project" is required.

Expected Behavior

The command should not fail and localization should be configured on the angular app.

GitHub Repo

No response

Steps to Reproduce

  1. Create a new nx workspace with an angular app: npx create-nx-workspace@latest angular-monorepo --preset=angular-monorepo
  2. From the workspace root, issue the following command to add localization to the angular app: nx add @angular/localize --project=angular-monorepo

The command fails with error SchematicsException [Error]: Option "project" is required.

Nx Report

Node   : 20.12.0
OS     : linux-x64
npm    : 10.5.0

nx (global)        : 18.2.1
nx                 : 18.2.3
@nx/js             : 18.2.3
@nx/jest           : 18.2.3
@nx/linter         : 18.2.3
@nx/eslint         : 18.2.3
@nx/workspace      : 18.2.3
@nx/angular        : 18.2.3
@nx/cypress        : 18.2.3
@nx/devkit         : 18.2.3
@nx/eslint-plugin  : 18.2.3
@nrwl/tao          : 18.2.3
@nx/web            : 18.2.3
@nx/webpack        : 18.2.3
typescript         : 5.4.4
---------------------------------------
Registered Plugins:
@nx/cypress/plugin
@nx/eslint/plugin

Failure Logs

user@MEG-X570:~/Tmp/nx-bug/angular-monorepo$ nx add @angular/localize --project=angular-monorepo

✔ Installing @angular/localize@latest...
✖ Initializing @angular/localize...

Command failed: npx nx g @angular/localize:ng-add --keepExistingVersions
SchematicsException [Error]: Option "project" is required.
    at /home/user/Tmp/nx-bug/angular-monorepo/node_modules/@angular/localize/schematics/ng-add/ng_add_bundle.js:127:13
    at callRuleAsync (/home/user/Tmp/nx-bug/angular-monorepo/node_modules/@angular-devkit/schematics/src/rules/call.js:77:24)
    at /home/user/Tmp/nx-bug/angular-monorepo/node_modules/@angular-devkit/schematics/src/rules/call.js:72:40
    at Observable._subscribe (/home/user/Tmp/nx-bug/angular-monorepo/node_modules/rxjs/dist/cjs/internal/observable/defer.js:8:31)
    at Observable._trySubscribe (/home/user/Tmp/nx-bug/angular-monorepo/node_modules/rxjs/dist/cjs/internal/Observable.js:41:25)
    at /home/user/Tmp/nx-bug/angular-monorepo/node_modules/rxjs/dist/cjs/internal/Observable.js:35:31
    at Object.errorContext (/home/user/Tmp/nx-bug/angular-monorepo/node_modules/rxjs/dist/cjs/internal/util/errorContext.js:22:9)
    at Observable.subscribe (/home/user/Tmp/nx-bug/angular-monorepo/node_modules/rxjs/dist/cjs/internal/Observable.js:26:24)
    at /home/user/Tmp/nx-bug/angular-monorepo/node_modules/rxjs/dist/cjs/internal/operators/map.js:9:16
    at OperatorSubscriber.<anonymous> (/home/user/Tmp/nx-bug/angular-monorepo/node_modules/rxjs/dist/cjs/internal/util/lift.js:14:28)


 NX   Failed to initialize @angular/localize. Please check the error above for more details.

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

I have reproduced this in a brand new nx workspace using the most recent version of nx.

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: angular Issues related to Angular support in Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants