I am learning about angular universal. At this step :
ng add @nguniversal/express-engine --clientProject angular.io-example
It is supposed to add some files namely : main.server.ts, but it is not doing anything. I tried the same command with sudo too. What is the problem?
FYI, I started off with a clean project so there indeed were dependencies missing, your case might be a bit different, depending on whether you already have some of the dependencies already installed.
Since it was doing the same for me too as mentioned, I went ahead and used
npm i @nguniversal/express-engine
which showed me some warnings about some dependencies which were missing.
In my case they were,
npm install ajv-keywords
and
npm install @angular/platform-server
then I ran
npm install @nguniversal/express-engine
to install the package, then
ng add @nguniversal/express-engine
which added the necessary dependencies you were asking for. Hope this is easy to follow
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With