I'm trying to deploy a Nuxt.js site using Netlify and Heroku, my build passes on Netlify but the link displays a blank page (https://fervent-swanson-d4b450.netlify.app/). I've tried following some tutorials online and tried to adapt other answers on SO for react apps with the same issue but I can't figure out what is going on and why it doesn't work.
This is my first time building a web app with Nuxt/Vue and deploying one live, my codebase is on github here https://github.com/KyleSFraser/Portfolio and my netlify build settings are as follows.
Web inspect shows the following errors but I can't make sense of them to know why my site isn't showing.
Any help would be appreciated in solving why my site shows blank.
EDIT
I managed to fix the CORS error by successfully adding the production URL as suggested and doing some setup on the Strapi database. I'm now left with the DOMException
and TypeError: "n is undefined"
, I've been refactoring my code to make sure there is no invalid HTML which could this but the same errors are persisting.
EDIT 2
Thanks to @arapl3y's comment and link, it's definitely a hydration problem, I've isolated the problem to being my components which rely on my API ProjectAccordion.vue
and ProjectItem.vue
.
I'm still not sure of the actual cause of the issue but it's looking like it's happening when I'm trying to fetch data from my Heroku API, I'm able to access and populate my database via my Heruoku URL so it leads me to believe it's the middlepoint of feeding the API into my app which is borked somewhere.
DOMException
andTypeError: "n is undefined"
, I had a look at the link you mentioned and I have tried to fix where I think there might have been invalid HTML in my components. I'm a bit confused why these errors occur on deployment but the frontend runs fine on my localhost? – fraserky