'NOT SUPPORTED: keyword "id", use "$id" for schema ID : TSLint (ng add @angular-eslint/schematics)
I am upgrading my Angular 10 application to Angular 13. I did well with other compatibilities of dependencies. The project is compiling and working fine. Now the time for TSLint I tried to update the lint with the below command.
ng add @angular-eslint/schematics
But getting the error message:
An unhandled exception occurred: NOT SUPPORTED: keyword "id", use "$id" for schema ID
Solution 1:[1]
Solution 2:[2]
ng add @angular-eslint/schematics@next
This worked for me github.com/angular-eslint/angular-eslint/issues/790.
Solution 3:[3]
It seams that a lot of packages throw this error. I had the same error when adding NgRx store. It looks like that installing the latest version of the packages usually fix the issue:
ng add package_name/@latest
Solution 4:[4]
I had the same problem. I could fix it by by upgrading angular/universal to the same version as my angular version is.
Solution 5:[5]
I had a conflict where the third-party package I was using had been replaced by an official one, but for some reason I had both of them in my package.json file The real issue though was that the angular.json file was using the older builder instead of the newer one.
I removed the package and used ng add to add the new package via its schematic, and after that things started working properly.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Richard Aguirre |
| Solution 2 | Chris Claude |
| Solution 3 | NeNaD |
| Solution 4 | pubkey |
| Solution 5 | Shafiq Jetha |

