Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

An unhandled exception occurred: NOT SUPPORTED: keyword "id", use "$id" for schema ID

When running ng deploy I get the following error:

An unhandled exception occurred: NOT SUPPORTED: keyword "id", use "$id" for schema ID
See "C:\Users\theoh\AppData\Local\Temp\ng-Nv0wMh\angular-errors.log" for further details.

The full log of the error is the following:

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

I tried ng add @angular-eslint/schematics@next as suggested here but it did not work. The versions I use are the following:

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1300.3
@angular-devkit/build-angular   13.0.3
@angular-devkit/core            13.0.3
@angular-devkit/schematics      13.0.3
@angular/cli                    13.0.3
@angular/fire                   7.0.2
@nguniversal/builders           13.0.1
@nguniversal/express-engine     13.0.1
@schematics/angular             13.0.3
rxjs                            6.6.7
typescript                      4.4.4

Any suggestions?

like image 238
chadoulis Avatar asked Nov 15 '22 18:11

chadoulis


1 Answers

I had the same problem. In my case, it was caused by @angular-builders/custom-webpack that was not updated during ng update. So manually updating it from version 10.0.1 to ^13.0.0 solved the problem.

like image 125
Murilo Avatar answered Dec 05 '22 19:12

Murilo