I try to refactor my Gatsby site regularly. I have already intergrate CI with github and Netlify, whenever I push my code to master, it will deploy to Netlify as well. Yesterday when I made changes, the Netfliy deployment failed with the following message.

Your site's "gatsby-node.js" created a page with a component that doesn't exist
 {path: 'posts/rebuilding-my-site/',
component: '/opt/build/repo/src/templates/blogPost.js'}

I spend a lot of time looking for the bug, because the site work without any issue in my local, just had an issue with Netlify. Searching in Google and Stackoverflow doesn't help as well.

After some investigation, I realize the error message is misleading During my refactoring, I have accidentally put the component as blogPost.js instead of blogpost.js . It still works in my local, but Netlify is case sensitive. FML.

About Me

I am a self-taught developer who is passionate about software development, entrepreneurship and finance. I love to write about my daily life at work and outside work.

You can find more about me on  Kenneth Au LinkedIn