DEV Community

loading...

Discussion on: Creating a Markdown Blog with Next.js

Collapse
didaquis profile image
Dídac García

Well explained!

I followed your tutorial in addition to this one: netlify.com/blog/2020/05/04/buildi...

I noticed that my code, the Netlify tutorial code and also yours have the same problem. If you open the development console of your browser and visit your site, you will see some 404 errors. The site works perfectly, but the errors are there! :-(

You can read more about issue that here loudnoises.us/solving-next-static-... and here github.com/zeit/now/issues/ 3294 but I can't solve it.

Do you have any idea about how to solve it?

Collapse
kendallstrautman profile image
Kendall Strautman Author • Edited

You probably need to use getStaticPaths where you are implementing dynamic routes. (exportPathMap is now discouraged). Or there may be something funky going on with the parameters you are passing the routes. I would also look into the build command you are using for production. Just recently I changed from using next export to just next build now that you can statically export at the page level with getStaticProps.