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

Schematic input does not validate against the Schema #20848

Closed
1 task done
cesco69 opened this issue May 19, 2021 · 4 comments · Fixed by #20849
Closed
1 task done

Schematic input does not validate against the Schema #20848

cesco69 opened this issue May 19, 2021 · 4 comments · Fixed by #20849
Assignees
Labels
area: @schematics/angular freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Milestone

Comments

@cesco69
Copy link

cesco69 commented May 19, 2021

🐞 Bug report

Command (mark with an x)

  • generate

Is this a regression?

Yes, it works on Angular 11

🔬 Minimal Reproduction

Into angular.json set skipTests at true to module schematic:

{
  ...
  "projects": {
    "frontend": {
     ...
      "schematics": {
        ...
        "@schematics/angular:module": {
          "skipTests": true
        },
        ...
      },
   },
}, 

run the command for generate new module:

ng g m foo

output

Schematic input does not validate against the Schema: {"skipTests":true,"name":"test","project":"frontend"}
Errors:

  Data path "" must NOT have additional properties(skipTests).

🔥 Exception or Error


Schematic input does not validate against the Schema: {"skipTests":true,"name":"foo","project":"frontend"}
Errors:

  Data path "" must NOT have additional properties(skipTests).

🌍 Your Environment



     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 12.0.0
Node: 12.22.1
Package Manager: npm 6.14.12
OS: win32 x64

Angular: 
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, localize, material
... material-moment-adapter, platform-browser
... platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1200.0 (cli-only)
@angular-devkit/build-angular   12.0.0 (cli-only)
@angular-devkit/core            12.0.0 (cli-only)
@angular-devkit/schematics      12.0.0 (cli-only)
@angular/cli                    12.0.0 (cli-only)
@schematics/angular             12.0.0 (cli-only)
rxjs                            6.6.7 (cli-only)
typescript                      4.0.5 (cli-only)

@bogacg
Copy link

bogacg commented May 20, 2021

It's closed but I'm still getting this error. It's not added to version 12.0.1? Do I need to remove node_modules folder and re-install?

@alan-agius4
Copy link
Collaborator

If you are already on 12.0.1, you can run ng update @angular/cli —migrate-only —from 12.0.0 —to 12.0.1

@bogacg
Copy link

bogacg commented May 20, 2021

Global CLI update to 12.0.1 then:

What I did was just upgrading packages from package.json , npm i and executing ng g m ...

Executing command you provide (changing to -) gives me this output:

Using package manager: 'npm'
Collecting installed dependencies...
Found 36 dependencies.
Package '-y' is not a dependency.

Last line being an error.

Creating a clean new project and then executing ng g m ... did work there.

On my existing project (started with v12.0.0) even after deleting node_modules and re-installing I'm still getting error.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @schematics/angular freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants