Build Fail: Gatsby Build Failing due to inability to find folders/Javascript bundles failing

Site Name: https://nifty-haibt-162826.netlify.app
Build Log: Netlify App
Repo: GitHub - DKBoston15/GradCapFinder-Site

Howdy folks, I am using Gatsby to build and host a pretty simple landing page. My builds were working just fine for awhile before they stopped working. I was unable to track down what changes I made to cause the build to fail. The log shows "build.command" failed . It is worth noting that the app builds without any issues locally. The logs are showing a failure on error Generating JavaScript bundles failed. Evidently it cannot find my components. I am unsure why and unsure how to move forward.

Steps I have taken:

  1. Removed package-lock.json and node modules folder. Reinstalled. Same issue.
  2. Through exploring forms, saw that the use of the build command CI= npm run build might help. It did not.
  3. Tried disconnecting and reconnecting my repo, no change.

After Comment Below

  1. Checked module filenames to make sure they are all the same, still no luck.
  2. Cleared cache and redeployed, still not working.

https://app.netlify.com/sites/nifty-haibt-162826/deploys/609f736dea0d218b939cbf3d#L118

You need need to make sure the file exists in your repo and the name of the file has the same case as your import statement. For example, if you import as import foo from bar your file name should also be bar and not Bar or BAR or anything else.

I checked all my file names to make sure they are correct. I also cleared cache and tried it again. Still no luck. I’ve had the same file structure since the beginning.

Would it be possible to share the repo?

Apologies, I thought I had. GitHub - DKBoston15/GradCapFinder-Site

As I can see, the case of the path is indeed different:

while the import statement is ../modules/hero/Hero.

1 Like

Well that’s fascinating as I changed the folder names locally awhile ago and have had several commits.

Ended up discovering that even though I changed them locally, Git did not pick up on it.

Found this post on Stack regarding git and case insensitive
changes.

Ran this command: git config core.ignorecase false.

Removed the old folders for git, and now we are all good. Thanks.

1 Like