tbakerx / react-resume-template

A personal resume website template built with React.js, Typescript, Next.js, and styled with Tailwind css
https://reactresume.com
MIT License
1.88k stars 1.43k forks source link

resumeData #14

Closed cpatrick67135 closed 4 years ago

cpatrick67135 commented 4 years ago

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?

Jay670 commented 4 years ago

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.

Jay670 commented 4 years ago

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

cpatrick67135 commented 4 years ago

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

cpatrick67135 commented 4 years ago

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

Jay670 commented 4 years ago

It maybe was because of the service worker it caches the app code sometimes

On Tue, 19 Nov, 2019, 5:05 AM cpatrick67135, notifications@github.com wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tbakerx/react-resume-template/issues/14?email_source=notifications&email_token=AHXT75V7E7RZ6F26BHR4B5LQUMRFJA5CNFSM4JMF7OS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEMJX6A#issuecomment-555260920, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHXT75UZCTEXVI33LWCC4LTQUMRFJANCNFSM4JMF7OSQ .