Angular 13+ is not supported
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
Hi, where did you change to solve the problem?
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.
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!