tailwind icon indicating copy to clipboard operation
tailwind copied to clipboard

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

Open SUNSEQ opened this issue 3 years ago • 12 comments

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

On running "ng test" I am getting the error "An unhandled exception occurred: NOT SUPPORTED: keyword "id", use "$id" for schema ID"

C:\Users\Admin\AppData\Local\Temp\ng-ScCV98\angular-errors.log [error] Error: NOT SUPPORTED: keyword "id", use "$id" for schema ID at Object.code (C:\SourceCode\node_modules@angular\cli\node_modules\ajv\dist\vocabularies\core\id.js:6:15) at keywordCode (C:\SourceCode\ode_modules@angular\cli\node_modules\ajv\dist\compile\validate\index.js:454:13) at C:\SourceCode\node_modules@angular\cli\node_modules\ajv\dist\compile\validate\index.js:222:17 at CodeGen.code (C:\SourceCode\node_modules@angular\cli\node_modules\ajv\dist\compile\codegen\index.js:439:13) at CodeGen.block (C:\SourceCode\node_modules@angular\cli\node_modules\ajv\dist\compile\codegen\index.js:568:18) at iterateKeywords (C:\SourceCode\node_modules@angular\cli\node_modules\ajv\dist\compile\validate\index.js:219:9) at groupKeywords (C:\SourceCode\node_modules@angular\cli\node_modules\ajv\dist\compile\validate\index.js:208:13) at C:\SourceCode\node_modules@angular\cli\node_modules\ajv\dist\compile\validate\index.js:192:13 at CodeGen.code (C:\SourceCode\node_modules@angular\cli\node_modules\ajv\dist\compile\codegen\index.js:439:13) at CodeGen.block (C:\SourceCode\node_modules@angular\cli\node_modules\ajv\dist\compile\codegen\index.js:568:18)

I have upgraded the app from Angular 11 to 13. After the upgrade, I am getting this issue I am using the "jest" framework for unit testing

Expected behavior

Minimal reproduction of the problem with instructions

For bug reports please provide the STEPS TO REPRODUCE and if possible a MINIMAL DEMO of the problem

What is the motivation / use case for changing the behavior?

Environment


Angular version: 13.1.2



Package.json
------------------------
"dependencies": {
    "@angular/animations": "~13.1.2",
    "@angular/common": "~13.1.2",
    "@angular/compiler": "~13.1.2",
    "@angular/core": "~13.1.2",
    "@angular/elements": "^13.1.2",
    "@angular/forms": "~13.1.2",
    "@angular/localize": "~13.1.2",
    "@angular/platform-browser": "~13.1.2",
    "@angular/platform-browser-dynamic": "~13.1.2",
    "@angular/router": "~13.1.2",
    "@ngrx/effects": "^11.1.0",
    "@ngrx/store": "^11.1.0",
    "@ngrx/store-devtools": "^11.1.0",
    "@progress/kendo-angular-buttons": "^6.1.0",
    "@progress/kendo-angular-common": "^2.0.0",
    "@progress/kendo-angular-dateinputs": "^5.1.0",
    "@progress/kendo-angular-dropdowns": "^5.2.0",
    "@progress/kendo-angular-inputs": "^7.2.0",
    "@progress/kendo-angular-intl": "^3.1.0",
    "@progress/kendo-angular-l10n": "^3.0.0",
    "@progress/kendo-angular-menu": "^3.0.1",
    "@progress/kendo-angular-popup": "^4.0.0",
    "@progress/kendo-angular-tooltip": "^3.0.0",
    "@progress/kendo-angular-treeview": "^5.1.1",
    "@progress/kendo-drawing": "^1.5.12",
    "@progress/kendo-licensing": "^1.1.4",
    "@progress/kendo-theme-default": "^4.21.0",
    "angular-mentions": "^1.2.0",
    "ng-block-ui": "^3.0.2",
    "ngx-clipboard": "^13.0.1",
    "ngx-ellipsis": "^2.3.1",
    "ngx-infinite-scroll": "^9.0.0",
    "ngx-spinner": "^9.0.2",
    "packages": "0.0.8",
    "rxjs": "~6.6.7",
    "subsink": "^1.0.1",
    "tslib": "^2.0.0"
  },
  "devDependencies": {
    "@angular-builders/jest": "^9.0.1",
    "@angular-devkit/build-angular": "^13.1.2",
    "@angular-eslint/eslint-plugin": "13.0.1",
    "@angular-eslint/eslint-plugin-template": "13.0.1",
    "@angular-eslint/schematics": "13.0.1",
    "@angular-eslint/template-parser": "^13.0.1",
    "@angular/cli": "^13.1.2",
    "@angular/compiler-cli": "~13.1.2",
    "@angular/language-service": "~13.1.2",
    "@types/eslint": "8.2.0",
    "@types/jest": "^27.0.3",
    "@types/node": "^12.11.1",
    "@typescript-eslint/eslint-plugin": "5.8.0",
    "@typescript-eslint/eslint-plugin-tslint": "5.8.0",
    "@typescript-eslint/parser": "5.8.0",
    "codelyzer": "^6.0.0",
    "del": "^5.1.0",
    "eslint": "^8.2.0",
    "eslint-config-prettier": "^8.3.0",
    "eslint-plugin-import": "^2.25.3",
    "eslint-plugin-jest": "^25.7.0",
    "eslint-plugin-jsdoc": "^37.4.0",
    "eslint-plugin-prefer-arrow": "^1.2.3",
    "eslint-plugin-prettier": "^4.0.0",
    "gulp": "^4.0.2",
    "gulp-cli": "^2.2.0",
    "gulp-replace": "^1.0.0",
    "http-server": "^0.12.1",
    "jest": "^27.4.5",
    "jest-junit": "^10.0.0",
    "jest-marbles": "^3.0.2",
    "jest-preset-angular": "^11.0.1",
    "prettier": "^2.5.1",
    "ts-node": "~8.3.0",
    "tslint": "~6.1.0",
    "typescript": "~4.5.4",
    "zone.js": "~0.11.4"
  }
  
  
  ------------------------------------------------
  
      / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 13.1.2
Node: 14.16.1
Package Manager: npm 6.14.12
OS: win32 x64

Angular: 13.1.2
... animations, cli, common, compiler, compiler-cli, core
... elements, forms, language-service, localize
... platform-browser, platform-browser-dynamic, router   

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.901.1
@angular-devkit/build-angular   13.1.2
@angular-devkit/core            9.1.1
@angular-devkit/schematics      13.1.2
@schematics/angular             13.1.2
rxjs                            6.6.7
typescript                      4.5.4



Browser:
- [x ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: v14.16.1  
- Platform:  windows

Others:
Windows 10

SUNSEQ avatar Jan 18 '22 12:01 SUNSEQ

Same issue on Angular 13. I hope the fix will be available soon !

gcanu avatar Jan 29 '22 16:01 gcanu

I think this might solve your problem, @gcanu

offwork avatar Feb 03 '22 19:02 offwork

thx @offwork, I solved my problem but I had to give up ngneat/tailwind ! Anyway, thx for ur awesome work !

gcanu avatar Feb 10 '22 12:02 gcanu

please solve it as soon as possible. thanks

sefatanam avatar Mar 06 '22 20:03 sefatanam

is it an issue with npm too? I face it with yarn

Lonli-Lokli avatar Mar 09 '22 14:03 Lonli-Lokli

And actually I face this error with installing script, ng add @ngneat/tailwind

Lonli-Lokli avatar Mar 09 '22 14:03 Lonli-Lokli

And actually I face this error with installing script, ng add @ngneat/tailwind

i faced it only angular version 13

sefatanam avatar Mar 09 '22 15:03 sefatanam

Yes I am on Angular 13 too

Lonli-Lokli avatar Mar 09 '22 15:03 Lonli-Lokli

Yes I am on Angular 13 too

I setup tailwind manually, I suggest you to setup tailwind manually. That's will be better. ✌️

sefatanam avatar Mar 09 '22 16:03 sefatanam

I faced the same issue in Angular 14, IONIC 6 project while generating pages/components . And resolved it by replacing id with $id manually on following paths:

  1. node_modules > @ionic > angular-toolkit > schematics > page > schema.json > replace id with $id on line 3.
  2. node_modules > @ionic > angular-toolkit > schematics > component > schema.json > replace id with $id on line 3.

KetanMonga avatar Sep 02 '22 10:09 KetanMonga

is it need to do every time after installing npm? @KetanMonga

sefatanam avatar Sep 02 '22 19:09 sefatanam

@sefatanam may be yes, untill any official fix release. I also tried number of different ways to fix this issue but finally came down to the above mentioned solution.

KetanMonga avatar Sep 03 '22 02:09 KetanMonga