I had the same problem at some point. I traced it to the fact that yarn could not read my environment.prod.ts file, so it was building DSpace with the default environment values. These include a server at
api.dspace.org. Check the syntax of your environment.prod.ts file, and pay attention to any errors revealed by "
yarn config:check:rest" before building.
Glenn