ng lint: NOT SUPPORTED: keyword "id", use "$id" for schema ID
See original GitHub issue🐞 Bug report
Command (mark with an x
)
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- extract-i18n
- run
- config
- help
- version
- doc
Is this a regression?
Yes, the previous version in which this bug was not present
Description
After install @angular-eslint/schematics
on new project, run ng lint
raise exception NOT SUPPORTED: keyword "id", use "$id" for schema ID
🔬 Minimal Reproduction
ng new my-app
? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? SCSS [ https://sass-lang.com/ documentation/syntax#scss]
CREATE my-app/angular.json (3207 bytes)
CREATE my-app/package.json (1070 bytes)
CREATE my-app/README.md (1051 bytes)
CREATE my-app/tsconfig.json (863 bytes)
CREATE my-app/.editorconfig (274 bytes)
CREATE my-app/.gitignore (620 bytes)
CREATE my-app/.browserslistrc (600 bytes)
CREATE my-app/karma.conf.js (1423 bytes)
CREATE my-app/tsconfig.app.json (287 bytes)
CREATE my-app/tsconfig.spec.json (333 bytes)
CREATE my-app/src/favicon.ico (948 bytes)
CREATE my-app/src/index.html (291 bytes)
CREATE my-app/src/main.ts (372 bytes)
CREATE my-app/src/polyfills.ts (2338 bytes)
CREATE my-app/src/styles.scss (80 bytes)
CREATE my-app/src/test.ts (745 bytes)
CREATE my-app/src/assets/.gitkeep (0 bytes)
CREATE my-app/src/environments/environment.prod.ts (51 bytes)
CREATE my-app/src/environments/environment.ts (658 bytes)
CREATE my-app/src/app/app-routing.module.ts (245 bytes)
CREATE my-app/src/app/app.module.ts (393 bytes)
CREATE my-app/src/app/app.component.html (24617 bytes)
CREATE my-app/src/app/app.component.spec.ts (1073 bytes)
CREATE my-app/src/app/app.component.ts (211 bytes)
CREATE my-app/src/app/app.component.scss (0 bytes)
V Packages installed successfully.
cd my-app
ng add @angular-eslint/schematics
i Using package manager: npm
V Found compatible package version: @angular-eslint/schematics@1.2.0.
V Package information loaded.
The package @angular-eslint/schematics@1.2.0 will be installed and executed.
Would you like to proceed? Yes
V Package successfully installed.
An unhandled exception occurred: NOT SUPPORTED: keyword "id", use "$id" for sche
ma ID
See "angular-errors.log" for furt her details.
angular-errors.log
[error] Error: NOT SUPPORTED: keyword "id", use "$id" for schema ID
at Object.code (\my-app\node_modules\ajv\dist\vocabularies\core\id.js:6:15)
at keywordCode (\my-app\node_modules\ajv\dist\compile\validate\index.js:454:13)
at \my-app\node_modules\ajv\dist\compile\validate\index.js:222:17
at CodeGen.code (\my-app\node_modules\ajv\dist\compile\codegen\index.js:439:13)
at CodeGen.block (\my-app\node_modules\ajv\dist\compile\codegen\index.js:568:18)
at iterateKeywords (\my-app\node_modules\ajv\dist\compile\validate\index.js:219:9)
at groupKeywords (\my-app\node_modules\ajv\dist\compile\validate\index.js:208:13)
at \my-app\node_modules\ajv\dist\compile\validate\index.js:192:13
at CodeGen.code (\my-app\node_modules\ajv\dist\compile\codegen\index.js:439:13)
at CodeGen.block (\my-app\node_modules\ajv\dist\compile\codegen\index.js:568:18)
🔥 Exception or Error
Error: NOT SUPPORTED: keyword "id", use "$id" for schema ID
🌍 Your Environment
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ ? \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 13.0.1
Node: 12.22.1
Package Manager: npm 6.14.12
OS: win32 x64
Angular: 13.0.0
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1300.1
@angular-devkit/build-angular 13.0.1
@angular-devkit/core 13.0.1
@angular-devkit/schematics 13.0.1
@angular/cli 13.0.1
@schematics/angular 13.0.1
rxjs 7.4.0
typescript 4.4.4
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:10 (1 by maintainers)
Top Results From Across the Web
keyword "id", use "$id" for schema ID : TSLint (ng add ...
The project is compiling and working fine. Now the time for TSLint I tried to update the lint with the below command. ng...
Read more >NOT SUPPORTED: keyword "id", use "$id" for schema ID
I have an Ionic 5 app. I Updated Angular to v13, and now when I try to create a page using ionic g...
Read more >NOT SUPPORTED: keyword "id", use "$id" for schema ID
an unhandled exception occurred: not supported: keyword "id", use "$id" for schema id. Add Answer | View In TPC Matrix. Technical Problem Cluster...
Read more >@schematics/angular | Yarn - Package Manager
The Angular CLI is a command-line interface tool that you use to initialize, develop, scaffold, and maintain Angular applications directly from a command ......
Read more >Schematics for libraries - Angular
With your schematics, your users can use ng add to install an initial version ... id: A unique ID for the schema in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After
v14-lts
release, if you are using any specific Angular major version, it is better to install schematics matching the Angular version. For example, I’m using Angularv14-lts
, so I’m installing schematics this way:ng add @angular-eslint/schematics@14
Hi @cesco69, you need to use the v13 prerelease with Angular 13:
ng add @angular-eslint/schematics@next
Please see #715