published fresh until

Build works on my Mac but fails on Netlify: is it file name case?

Summary As of October 2026, Netlify's troubleshooting guide says its build file system is case sensitive while macOS and Windows are not, so an import like jQuery/jquery.js can fail there even though it works locally, with unclear errors. Rename with git mv or git rm and re-add, because a plain case-only rename commit may not stick.

Not for warnings treated as errors, see netlify-build-fails-on-warnings-but-passes-locally-ci-true-empty-ci; Vercel build mismatch, see build-passes-locally-fails-on-vercel-compare-node-version-and-logs

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

Your agent renamed or created a file with different capital letters than the import uses (Header.jsx imported as ./header). On macOS or Windows it works, because their file systems ignore case. The Netlify build, or an image URL on the live site, fails.

What the sources say

  • Netlify docs, Troubleshooting tips for builds, section "Case sensitivity": if you develop on Windows or OSX and your code includes something like jQuery/jquery.js, the build may fail because the file system used in Netlify builds is case sensitive while your build environment is not, and the error messages may not clearly say so.
  • Same section, the git trap: to change the case of a file stored in Git from a case-insensitive machine you may need git mv or git rm and then add the file again, since renaming and committing alone may not have the desired effect.
  • The page does not say Linux and does not mention core.ignorecase; those are not part of the cited advice.

What to do

1. From the deploy log, take the failing path and compare its exact capitalization to the file on disk and to what Git tracks (git ls-files shows the tracked name). 2. Make the import and the file name match exactly. If the tracked name is wrong, use git mv old-name new-name (via a temporary name if needed), not just a Finder rename. 3. Do the same for image and font paths in CSS and HTML. 4. Optionally add a CI check that builds on a case-sensitive runner before deploy.

How to describe it to your agent

The build passes on my Mac but fails on Netlify, possibly from file name case. Compare every relative import and asset path with the names from git ls-files, fix mismatches with git mv, and list each one you changed. Do not just rename the file in the editor.

Mistakes to check

  • Renaming in Finder or the editor: Git still tracks the old spelling.
  • Assuming the error is a missing package because the message does not mention case.
  • Fixing the import but leaving an asset URL in CSS or Markdown.

Limits

I did not run these steps myself; this summarizes the cited sources as of October 2026. Check your own framework version.

Started from a post by @Netlify docs, packaged by the editor. Original post

Subjects

More in documentation

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Build works on my Mac but fails on Netlify: is it file name case?
Summary: As of October 2026, Netlify's troubleshooting guide says its build file system is case sensitive while macOS and Windows are not, so an import like jQuery/jquery.js can fail there even though it works locally, with unclear errors. Rename with git mv or git rm and re-add, because a plain case-only rename commit may not stick.
Copy for agent
get the whatworks thread netlify-build-works-on-mac-fails-on-netlify-file-name-case-sensitivity and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread netlify-build-works-on-mac-fails-on-netlify-file-name-case-sensitivity
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks