I've upgraded my application from Angular 11 to 13. Upgrading from 11 from 12 worked fine, but now I have some problems going from 12 to 13.
If I try to run ng serve
or ng build
I get the following error:
An unhandled exception occurred: NOT SUPPORTED: keyword "id", use "$id" for schema ID
I've upgraded my libraries but I keep getting this error.
This is the error log:
[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:454: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)
and this is my package.json:
"dependencies": {
"@angular/animations": "~13.3.11",
"@angular/cdk": "^13.3.9",
"@angular/common": "~13.3.11",
"@angular/compiler": "~13.3.11",
"@angular/core": "~13.3.11",
"@angular/flex-layout": "^12.0.0-beta.34",
"@angular/forms": "~13.3.11",
"@angular/material": "^13.3.9",
"@angular/platform-browser": "~13.3.11",
"@angular/platform-browser-dynamic": "~13.3.11",
"@angular/router": "~13.3.11",
"@ngx-translate/core": "13.0.0",
"@ngx-translate/http-loader": "^6.0.0",
"mat-currency-format": "0.0.7",
"ng-inline-svg": "13.0.0",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"xml-beautify": "^1.2.3",
"xml-formatter": "^2.6.1",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-builders/custom-webpack": "^11.1.1",
"@angular-devkit/build-angular": "~13.3.9",
"@angular-eslint/builder": "~13.5.0",
"@angular-eslint/eslint-plugin": "~13.5.0",
"@angular-eslint/eslint-plugin-template": "~13.5.0",
"@angular-eslint/schematics": "~13.5.0",
"@angular-eslint/template-parser": "~13.5.0",
"@angular/cli": "~13.3.9",
"@angular/compiler-cli": "~13.3.11",
"@types/jasmine": "~3.6.0",
"@types/node": "^12.20.55",
"@types/underscore": "^1.11.3",
"@typescript-eslint/eslint-plugin": "5.29.0",
"@typescript-eslint/parser": "5.29.0",
"change-case": "^4.1.2",
"codelyzer": "^6.0.0",
"eslint": "^8.18.0",
"globby": "^11.0.3",
"initials": "^3.1.1",
"inquirer": "^8.0.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.4.1",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"karma-sonarqube-unit-reporter": "0.0.23",
"protractor": "~7.0.0",
"sonar-scanner": "^3.1.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~4.6.4",
"underscore": "^1.9.1",
"xml-beautifier": "^0.4.3"
}
CodePudding user response:
You need to update the lint schematics
ng add @angular-eslint/schematics@next
CodePudding user response:
install schematics by deleting package lock and node_modules then running npm I and ng add @angular-eslint/schematics@next
CodePudding user response:
It seems you have custom schematics in your app, please check the below issue: