I converted my existing angular-cli application to angular-universal by following this guide.
You can look at my complete source code here.
I am able to buil
I checked out your repo and was able to view the dist fine without that error in the browser. Perhaps you forgot to add the flag -prod
when running build? Please try this
ng build --prod
You can also remove the dist completely and/or remove node_modules, do npm cache clean
, run npm install
before trying to build again.
If you are using npm scripts, I notice that your /server build is missing the --prod
flag. Please try this
"build:server": "ng build --prod --app 1 --output-hashing=false",