I am trying to run "ng add @nativescript/schematics" to migrate my Angular app to Nativescript for mobile support.
When I run the command, not only does it not generate the .tns files that signify successful conversion, it prints this in the console:
√ Packages successfully installed.
NOT SUPPORTED: keyword "id", use "$id" for schema ID
It gives very little to go off of. I have tried searching the @nativescript module in the node_modules folder and there is no "id" field to speak of.
@nativescript/schematicsare deprecated:https://www.npmjs.com/package/@nativescript/schematics
The main way to develop angular web+nativescript projects now is using Nx. The reason being that using the old schematics and having
.tns.tsand.tns.htmlfiles ended up very confusing and more often than not introduced a lot of anti-patterns on both NativeScript and web.So while seemed like a good idea at first, you always ended up with:
Essentially reusing 0 lines of code. On top of that, the native application would also follow a "web" approach of nesting a lot of layouts, which are much heavier on native platforms than divs are on the web (https://blog.nativescript.org/nativescript-angular-performance-tips-tricks/).
In the end you ended up with subpar DX and UX on both web and native apps, which are now much easier to solve by using Nx and creating shared libraries for code sharing and platform-specific libraries for everything else.