Fs.writefile not writing to github repo on build from netlify

Hi there,

Are you aware that we have NO git permissions to push to your git provider? I don’t think you’re asking for this in your post, but your title implies you are trying to write back to your git provider during build which you can do, but you need to do more work to include auth details as mentioned here:

Reading your post, I think I see the problem:

fs.writeFile("./src/Shared/products/products.json"

Are you aware that our build environment is case sensitive? Do you actually have a “Shared” folder (with capital S) in git? I suspect is lowercase and in our build environment Shared != shared, so perhaps you’re ending up with both or the wrong one?

This article may be helpful to change the case in git so you can try to fix it: