Skip to content

schema generation fails ("Error: NOT SUPPORTED: keyword "id", use "$id" for schema ID") #2017

@rklec

Description

@rklec

STR

$ npm install --save-dev ng2-charts-schematics
npm warn deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm warn deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm warn deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated

added 138 packages in 1m

199 packages are looking for funding
  run `npm fund` for details
$ node_modules\@angular\cli\bin\ng.js generate ng2-charts-schematics:bar VorgangStatisticsChart
An unhandled exception occurred: NOT SUPPORTED: keyword "id", use "$id" for schema ID
See "C:\Users\*****\AppData\Local\Temp\ng-CLjYeT\angular-errors.log" for further details.

The mentioned file contains some Angular error:

[error] Error: NOT SUPPORTED: keyword "id", use "$id" for schema ID
    at Object.code (***\node_modules\@angular\cli\node_modules\ajv\dist\vocabularies\core\id.js:6:15)
    at keywordCode (***\node_modules\@angular\cli\node_modules\ajv\dist\compile\validate\index.js:464:13)
    at ***\node_modules\@angular\cli\node_modules\ajv\dist\compile\validate\index.js:222:17
    at CodeGen.code (***\node_modules\@angular\cli\node_modules\ajv\dist\compile\codegen\index.js:439:13)
    at CodeGen.block (***\node_modules\@angular\cli\node_modules\ajv\dist\compile\codegen\index.js:568:18)
    at iterateKeywords (***\node_modules\@angular\cli\node_modules\ajv\dist\compile\validate\index.js:219:9)
    at groupKeywords (***\node_modules\@angular\cli\node_modules\ajv\dist\compile\validate\index.js:208:13)
    at ***\node_modules\@angular\cli\node_modules\ajv\dist\compile\validate\index.js:192:13
    at CodeGen.code (***\node_modules\@angular\cli\node_modules\ajv\dist\compile\codegen\index.js:439:13)
    at CodeGen.block (***\node_modules\@angular\cli\node_modules\ajv\dist\compile\codegen\index.js:568:18)

System

package.json / deps:

  "dependencies": {
    "@angular/animations": "18.2.13",
    "@angular/cdk": "18.2.14",
    "@angular/common": "18.2.13",
    "@angular/compiler": "18.2.13",
    "@angular/core": "18.2.13",
    "@angular/forms": "18.2.13",
    "@angular/platform-browser": "18.2.13",
    "@angular/platform-browser-dynamic": "18.2.13",
    "@angular/router": "18.2.13",
    // *****
    "chart.js": "^4.5.0",
    // *****
    "ng2-charts": "^7.0.0",
    "ngx-mf": "4.1.1",
    "rxjs": "7.8.1",
    "tslib": "2.3.0",
    "zone.js": "0.14.10"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "18.2.12",
    "@angular-eslint/builder": "18.4.3",
    "@angular-eslint/eslint-plugin": "18.4.3",
    "@angular-eslint/eslint-plugin-template": "18.4.3",
    "@angular-eslint/schematics": "18.4.3",
    "@angular-eslint/template-parser": "18.4.3",
    "@angular/cli": "18.2.12",
    "@angular/compiler-cli": "18.2.13",
    "@angular/language-service": "18.2.13",
    // *****
    "eslint": "8.57.0",
    "jasmine-core": "5.1.0",
    "jasmine-spec-reporter": "7.0.0",
    "karma": "6.4.0",
    "karma-chrome-launcher": "3.2.0",
    "karma-coverage": "2.2.0",
    "karma-firefox-launcher": "^2.1.3",
    "karma-jasmine": "5.1.0",
    "karma-jasmine-html-reporter": "2.1.0",
    "karma-spec-reporter": "0.0.36",
    "ng2-charts-schematics": "^0.1.7",
    "protractor": "7.0.0",
    "ts-node": "8.3.0",
    "typescript": "5.5.3"
  },
$ npm list chart.js
***
+-- [email protected]
`-- [email protected]
  `-- [email protected]
$ npm list @angular/cli
***
`-- @angular/[email protected]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions