Med-KG
Med-KG

Reputation: 109

Angular 8 universal server side rendering

I am following this tutorial https://blog.angular-university.io/angular-universal/ but I couldn't execute the first command

 ng generate universal --client-project -the name of your client project-

the error is

Target name already exists.

any suggestions or if anyone has a better solution to implement angular universal on an existing angular project?

Upvotes: 2

Views: 4002

Answers (3)

Bohdan Danyltiv
Bohdan Danyltiv

Reputation: 31

In my case, I already had server object in angular.json. I mean in projects.[project name]. architect.server Just remove it, if it unnecessary for you, and command will work

Upvotes: 1

Hugo Bayoud
Hugo Bayoud

Reputation: 234

Run this command as shown above StepUp

ng generate universal --client-project=application-name

where <application_name> is the name you can find in your package.json (example)

Here, I'll run

ng generate universal --client-project=client

Upvotes: 0

StepUp
StepUp

Reputation: 38094

Try to run your command like this with = sign:

ng generate universal --client-project=YourApplicationName

Upvotes: 5

Related Questions