Angular, Travis upload it on Github pages with the gh-pages branch but this time all I get is a blank page and the following error messages in the console :

hello,

seems like it’s working locally:

Date: 2021-13-18T10:08:54.367Z - Hash: e5b89a7c4ac0441d6496
4 unchanged chunks
chunk {main} main.js, main.js.map (main) 88.2 kB [initial] [rendered]
Time: 311ms

I used to deploy like this and it worked but there might has been changes or I did some mistakes ? Travis build is also passing locally.

Can anyone tell me what I am doing wrong? Thanks!

Hey @SolarUltima,

You should change the build script Travis hook in your package.json to :

"ng build --base-href ./ "

Which I’m guessing is the problem, I’ve seen this exact problem on more than one occasion.

The reason it’s not working in your repository is that the Angular CLI by default use base href="/" in the index.html, consequently the browser can’t locate the missing resources, so in turn you get an error output.

Imprint