79421357

Date: 2025-02-07 15:21:36
Score: 0.5
Natty:
Report link

After several times adding <base href="/xxx/"> in the index.html and "deployUrl": "/xxx/", of my angular.json /xxx/ being the directory to which the deployed site points, I still had the same problem. This post is what definitely allowed me to resolve the problem.

This issue occurs when using git-bash on Windows.

The git-bash sees the last argument of the command ng build --configuration development --base-href /xxx/ as a path relative to its binary folder and prepends the argument with that (it converts the "seems-to-be" relative path into an absolute path).

So, I used PowerShell instead of Git-Bash and the issue was gone.here is the stack overflow post which allowed me to solve the problem

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: AkizaS