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+ is not supported #328

Open
4r7if3x opened this issue Nov 18, 2022 · 3 comments
Open

Angular 13+ is not supported #328

4r7if3x opened this issue Nov 18, 2022 · 3 comments

Comments

@4r7if3x
Copy link

4r7if3x commented Nov 18, 2022

Environment

  • @angular/cli 15.0.0
  • @nativescript/schematics 11.2.0

Describe the bug
The schematics cannot be used on Angular v13 or newer.

To Reproduce

$ ng new --collection=@nativescript/schematics app --shared

  An unhandled exception occurred: NOT SUPPORTED: keyword "id", use "$id" for schema ID
  See "/tmp/ng-8bQx95/angular-errors.log" for further details.

Additional context
JSON schemas are using draft-07 format since Angular v13 [1][2]. I tried to patch this myself, but I couldn't push the hotfix branch for PR. Additionally, please apply the following changes as well:

README.md

- You should be using @angular/[email protected] or newer.
+ You should be using @angular/[email protected] or newer.
CONTRIBUTING.md

- npm install
+ npm install --legacy-peer-deps
@brnLucas
Copy link

Hi, where did you change to solve the problem?

@4r7if3x
Copy link
Author

4r7if3x commented Dec 16, 2022

Hi, where did you change to solve the problem?

You basically need to rename all id keys to $id in all JSON schemas. The files are usually named schema.json, but you can run a recursive text search for "id": to find them all and replace these with "$id": instead.

@realtica
Copy link

realtica commented Jan 2, 2023

Same here,
npm install -g @angular/[email protected]
with version 12 works but you get this:

❯ ng generate component channel
"SchematicsNativeScriptAngularComponent" schema is using the keyword "id" which its support is deprecated. Use "$id" for schema ID.
"SchematicsAngularComponent" schema is using the keyword "id" which its support is deprecated. Use "$id" for schema ID.
Option "entryComponent" is deprecated: Since version 9.0.0 with Ivy, entryComponents is no longer necessary.
CREATE src/app/channel/channel.component.spec.ts (633 bytes)
CREATE src/app/channel/channel.component.ts (278 bytes)
CREATE src/app/channel/channel.component.css (49 bytes)
CREATE src/app/channel/channel.component.html (63 bytes)

This schema needs to be upgraded!

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

No branches or pull requests

3 participants