Closed benjaminforras closed 2 years ago
Hey there, sorry for the late response. How are you building NestJS and angular? are you using the built-in build.sh script? are you using the docker build? are you building it manually?
No problem, I'm using NX's build command, like this: nx build
In order to use SSR, you will also need to build the angular part and move the angular dist into the appropriate directory in your dist. Have a look at the build.sh
to see how it builds Angular and where it copies the dist files, this is important because express will then mount it from that target directory. Also make sure to add to your production.json
(if it's running on production) the following:
"ANGULAR": {
"MOUNT": "true",
"USE_SSR": "true"
}
Okay, I got this, but when I require the file itself inside the angular-mounter.ts file it'll throw the error in the issue description
Hey, can you please write the error?
Hi! I'm trying to implement this integration with the SSR and NestJS in a NX monorepo. Building the app is fine. However, when I try run it, I encounter the following error message when I mount the Angular SSR server:
I did not change much, just changed some of the outputPath's to match NX's. Every file is in place Can you help me with this?