I try to prerender my Angular application using Angular Universal, but when I execute the desired command ng run my-app:prerender or ng run my-app:serve-ssr I get the following error:
Error: NOT SUPPORTED: keyword "id", use "$id" for schema ID
at Object.code (D:\Github\was-angular-frontend-MVP\node_modules\@angular\cli\node_modules\ajv\dist\vocabularies\core\id.js:6:15)
at keywordCode (D:\Github\was-angular-frontend-MVP\node_modules\@angular\cli\node_modules\ajv\dist\compile\validate\index.js:454:13)
at D:\Github\was-angular-frontend-MVP\node_modules\@angular\cli\node_modules\ajv\dist\compile\validate\index.js:222:17
at CodeGen.code (D:\Github\was-angular-frontend-MVP\node_modules\@angular\cli\node_modules\ajv\dist\compile\codegen\index.js:439:13)
at CodeGen.block (D:\Github\was-angular-frontend-MVP\node_modules\@angular\cli\node_modules\ajv\dist\compile\codegen\index.js:568:18)
at iterateKeywords (D:\Github\was-angular-frontend-MVP\node_modules\@angular\cli\node_modules\ajv\dist\compile\validate\index.js:219:9)
at groupKeywords (D:\Github\was-angular-frontend-MVP\node_modules\@angular\cli\node_modules\ajv\dist\compile\validate\index.js:208:13)
at D:\Github\was-angular-frontend-MVP\node_modules\@angular\cli\node_modules\ajv\dist\compile\validate\index.js:192:13
at CodeGen.code (D:\Github\was-angular-frontend-MVP\node_modules\@angular\cli\node_modules\ajv\dist\compile\codegen\index.js:439:13)
at CodeGen.block (D:\Github\was-angular-frontend-MVP\node_modules\@angular\cli\node_modules\ajv\dist\compile\codegen\index.js:568:18)
Which seems to come from @angular/cli. I can't imagine Angular creating Angular Universal but it not being compatible with Angular CLI.
EDIT: downgrading @angular/cli to version 12.0.0 did 'solve' the issue for me, as described in this issue. However, the error still exists, but it's just shown as a warning and not causing the build to break.