First time poster here! I have tried searching for this issue but I can’t seem to find anything related to it.
I am building a NuxtJS app but when I deploy it and try and hit the single URL for a single ‘work’ entry I get a 404 not found error. If I click this link straight from the home page the page loads fine. I get the feeling this could be due to reading the content on the page from a JSON file. Is there anything I could do to resolve this issue?
I notice in the docs it says - " Save a plain text file called _redirects to the publish directory of your site. You can find _redirects file syntax details below."
I have dist in the my gitignore file because it is being generated by netlify can you think of another way to do this?
@WilliamDowling89, the recommended workaround is to keep _redirects elsewhere in the repo and then copy it to the publish directory in the build command at Netlify.
So, if your build command is:
nuxt generate
The build command might become:
nuxt generate && cp _redirects dist
The && in the line above is a boolean logical “AND” in bash. It means the copy command won’t run if the nuxt generate command exits with an error.
If this doesn’t work, would you please send me a link to the deploy? If so, I’ll be happy to find a solution that does.