0

So I was following this tutorial to deploy this personal website template to github pages. My personal page is hosting here:

https://samuelstentz.github.io/react-resume-sam/

master branch shows the source I run npm run deploy from. (https://github.com/SamuelStentz/react-resume-sam)

But it appears all of the information in public/resumeData.json does not load for some reason. If I run it locally with npm start all of this info shows up. Not sure why. I fiddled with the path of this url which loads resumeData.json with jquery inside of App.js and it didn't change anything. I run npm run deploy to add to github pages.

getResumeData(){
$.ajax({
  url:'/resumeData.json',
  dataType:'json',
  cache: false,
  success: function(data){
    this.setState({resumeData: data});
  }.bind(this),
  error: function(xhr, status, err){
    console.log(err);
    alert(err);
  }
});

}

Does anyone have any troubleshooting tips? Thanks.

2 Answers2

1

I was able to solve this issue by changing the ajax url to /{reponame}/resumeData.json per the suggestion here: https://github.com/gitname/react-gh-pages/issues/9

emmbra
  • 11
  • 1
0

I was able to "fix" this by manually adding "./" to the front of the static.js in gh-pages but I'm sure there is a better solution