1

A bit of a newbie with Nativescript so I tried to add Angular Universal building to an existing Angular 9/Nativescript app and received an error:

[error] Error: Schematic "universal" not found in collection "@nativescript/schematics"

David
  • 33,444
  • 11
  • 80
  • 118

1 Answers1

2

A nativescript application is a native client app that has a JS engine shipped inside which evaluates the high level nativescript codes bridging them into the platforms native language. Angular Universal makes rendering server side. Applying it to a client application development framework such as Nativescript is not conceptually valid and achievable.

EDIT: It's been a while since I left coding Nativescript. Shared project support came up and it seems for the web part of the shared project theoretically Angular Universal can be applied however Nativescript's schematics do not support it yet.

talhature
  • 2,246
  • 1
  • 14
  • 28
  • Angular Universal is designated for rendering from server side, make it easy for search engine. You will not require any of these for an app. – Manoj Feb 25 '20 at 19:08
  • I was trying to leverage a project that had both Angular and Nativescript together to increase code share between the two. Obviously I wanted Nativescript for the app side of things and Angular for the browser side. On top of that, I figured I could leverage Angular Universal for the browser side to increase load time and search engine optimization but I don't believe all of these pieces will work together based on the error I got when trying to add Angular Universal to the same project. – coltsfanatic07 Feb 26 '20 at 15:35
  • So basically Nativescript + Angular + Angular Universal in the same project. Maybe I should make it more clean in the Title. – coltsfanatic07 Feb 26 '20 at 15:37
  • Then I'm updating my answer accordingly. Thanks for clarification. – talhature Feb 27 '20 at 05:30