I use angular 8 and server-side-rendering but i got error when i run npm run build:ssr
As you can see, src
is repeated twice home/app/front/**src
I had the same error. This is how i solved it:
In src/tsconfig.server.json
Change src/main.server.ts
to main.server.ts
In file src/tsconfig.server.json
(generated by ng add @nguniversal/express-engine --clientProject myProject
) I changed
"files": [ "src/main.server.ts", "server.ts" ],
into
"files": [ "main.server.ts", "../server.ts" ],
After that npm run build:ssr
works fine.
ng add @nguniversal/express-engine
run this command from inside your application folder