Github pages wont deploy correctly only populates blank screen #52368
-
Select Topic AreaQuestion BodyHi this is my first time trying to deploy a project to github pages, whenever I do it just shows a blank page. The project works when I do npm run dev but not npm run deploy, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
Take a look at the <body> <div id="root"></div> <script src="/App.79369579.js"></script> </body> I assume that the script is supposed to populate the document, but it can't be loaded because there's an incorrect absolute URL (starting with |
Beta Was this translation helpful? Give feedback.
-
Additional information:
|
Beta Was this translation helpful? Give feedback.
-
I have done all the solutions that are mentioned above still its not working for me |
Beta Was this translation helpful? Give feedback.
Take a look at the
index.html
on yourgh-pages
branch. Its body is basically empty:I assume that the script is supposed to populate the document, but it can't be loaded because there's an incorrect absolute URL (starting with
/
).App.79369579.js
exists in your repository, but it's deployed tohttps://morganwestcoding.github.io/morgan-west-portfolio/App.79369579.js
, nothttps://morganwestcoding.github.io/App.79369579.js
(where the<script>
tag tells the browser to look). You'll need to either make the URL relative (so it works no matter under which path your site is deployed), or fix the base of the path.