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

[BUG] InvalidInputOptions error when initializing @angular/pwa with Nx #22932

Closed
1 of 4 tasks
patrykluszcz opened this issue Apr 21, 2024 · 0 comments · Fixed by #23064
Closed
1 of 4 tasks

[BUG] InvalidInputOptions error when initializing @angular/pwa with Nx #22932

patrykluszcz opened this issue Apr 21, 2024 · 0 comments · Fixed by #23064
Assignees
Labels
scope: angular Issues related to Angular support in Nx type: bug

Comments

@patrykluszcz
Copy link

patrykluszcz commented Apr 21, 2024

Current Behavior

Received a schema validation error when running nx add @angular/pwa --project=myproject. The error message states 'Data path "" must NOT have additional properties(keepExistingVersions).'

Expected Behavior

The command should successfully add PWA capabilities to the specified project within the Nx workspace without schema validation errors

GitHub Repo

No response

Steps to Reproduce

  1. Set up an Nx monorepo workspace with Angular projects.
  2. Run the command nx g @angular/pwa:ng-add --project=myproject (replace myproject with the actual project name).
  3. Observe the InvalidInputOptions error that appears in the terminal.

Nx Report

Node   : 20.10.0
OS     : darwin-arm64
npm    : 10.2.5

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

Failure Logs

user@users-MacBook-Air frontend % nx add @angular/pwa --project=myproject

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

Command failed: npx nx g @angular/pwa:ng-add --keepExistingVersions --project=myproject
InvalidInputOptions [Error]: Schematic input does not validate against the Schema: {"keepExistingVersions":true,"project":"myproject","target":"build"}
Errors:

  Data path "" must NOT have additional properties(keepExistingVersions).
    at /Users/user/Desktop/myproject/frontend/node_modules/@angular-devkit/schematics/tools/schema-option-transform.js:30:27
    at /Users/user/Desktop/myproject/frontend/node_modules/@angular-devkit/schematics/node_modules/rxjs/dist/cjs/internal/operators/map.js:10:37
    at OperatorSubscriber._this._next (/Users/user/Desktop/myproject/frontend/node_modules/@angular-devkit/schematics/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:33:21)
    at Subscriber.next (/Users/user/Desktop/myproject/frontend/node_modules/@angular-devkit/schematics/node_modules/rxjs/dist/cjs/internal/Subscriber.js:51:18)
    at /Users/user/Desktop/myproject/frontend/node_modules/@angular-devkit/schematics/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js:13:24
    at OperatorSubscriber._this._next (/Users/user/Desktop/myproject/frontend/node_modules/@angular-devkit/schematics/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:33:21)
    at Subscriber.next (/Users/user/Desktop/myproject/frontend/node_modules/@angular-devkit/schematics/node_modules/rxjs/dist/cjs/internal/Subscriber.js:51:18)
    at /Users/user/Desktop/myproject/frontend/node_modules/@angular-devkit/schematics/node_modules/rxjs/dist/cjs/internal/operators/take.js:15:32
    at OperatorSubscriber._this._next (/Users/user/Desktop/myproject/frontend/node_modules/@angular-devkit/schematics/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:33:21)
    at Subscriber.next (/Users/user/Desktop/myproject/frontend/node_modules/@angular-devkit/schematics/node_modules/rxjs/dist/cjs/internal/Subscriber.js:51:18) {
  errors: [
    {
      instancePath: '',
      schemaPath: '#/additionalProperties',
      keyword: 'additionalProperties',
      params: [Object],
      message: 'must NOT have additional properties'
    }
  ]
}


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

Package Manager Version

No response

Operating System

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

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: angular Issues related to Angular support in Nx type: bug
Projects
None yet
2 participants