Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 13 - NOT SUPPORTED: keyword "id", use "$id" for schema ID #77

Closed
mmonteiroc opened this issue Nov 11, 2021 · 6 comments · Fixed by #79 or #83
Closed

Angular 13 - NOT SUPPORTED: keyword "id", use "$id" for schema ID #77

mmonteiroc opened this issue Nov 11, 2021 · 6 comments · Fixed by #79 or #83

Comments

@mmonteiroc
Copy link

Describe the bug
Trying to run ng add @briebug/jest-schematic
Get the following error

ng add @briebug/jest-schematic
An unhandled exception occurred: NOT SUPPORTED: keyword "id", use "$id" for schema ID
See "C:\Users\montei0m\AppData\Local\Temp\ng-p0TjR2\angular-errors.log" for further details.

SAME ISSUE WITH THE GLOBALLY INSTALLED
To Reproduce
Steps to reproduce the behavior:
image

Expected behavior
That works as in the gif of your readme file
image

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Mac, Windows] Windows
  • Node version: [e.g. 8.11.3] 14.17.3
  • NPM or Yarn version [e.g. Yarn 1.3.0] NPM 6.14.7
  • App type [e.g. Angular CLI, Nx Workspace]
  • Angular version [e.g. @angular/core: "6.0.3"]
 ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 13.0.1
Node: 14.17.3
Package Manager: npm 6.14.7
OS: win32 x64

Angular: 13.0.0
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, localize, 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

Additional context
Add any other context about the problem here.

@mmonteiroc
Copy link
Author

CONFIRMED WITH ANGULAR 12 WORKS

@snutij
Copy link

snutij commented Nov 14, 2021

I reproduce this issue on new project (generated by ng new), with [email protected]

@patou
Copy link
Contributor

patou commented Nov 19, 2021

I created a PR #79 to correct all issues with angular 13.

@fireflysemantics
Copy link

Got the same problem:


The package @briebug/[email protected] will be installed and executed.
Would you like to proceed? Yes
✔ Package successfully installed.
An unhandled exception occurred: NOT SUPPORTED: keyword "id", use "$id" for schema ID
See "/private/var/folders/d3/1n3l12yn5nx_42xffkx5yvlw0000gn/T/ng-VydCyo/angular-errors.log" for further details.

@patou
Copy link
Contributor

patou commented Dec 6, 2021

I publish the correction on a new package npm :
https://www.npmjs.com/package/@patoudss/jest-schematic

Juste do :

ng add @patoudss/jest-schematic 

@fireflysemantics
Copy link

fireflysemantics commented Dec 12, 2021

This works! @patou THANKS!!

The only thing is that for library projects, I get this error:

● Validation Error:
  Module ts-jest in the transform option was not found.

Which can be fixed by just installing ts-jest:

npm i -D ts-jest

I now noticed that ts-jest is having issues with importing from angular package format library dependencies:

https://stackoverflow.com/questions/70326350/jest-encountered-an-unexpected-token-error-when-using-ts-jest

Anyone else seeing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants