tbakerx/react-resume-template

resumeData

cpatrick67135 opened this issue · 5 comments

I am having the issue of the resumeData json file not linking to the rest of the webpage when I push it to the github repository. On my local server, the resumeData file is linked and filling in all of my data. There is just a problem with hosting on github. The error in the console says "Failed to load resource: /resumeData.json?_=1573576264900:1 the server responded with a status of 404 ()." Has anyone found the solution for this?

I'm having this similar problem. Everything seems to work just fine on the local server but when I try to host it the data doesn't load from the resumeData.json file.

Just put ./ Instead of / for the path of resumeData in App.js

I tried doing that and it still doesn't work. I copied and pasted the change you suggested below.

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);
}
});
}

Nevermind. It worked after I reloaded the screen a couple of times. Thank you!