question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Case insensitivity causes builds to fail when run on another platform

See original GitHub issue

Do you want to request a feature or report a bug?

Feature, though if you squint at it, it looks like a bug.

What is the current behavior?

If a user is building their application on a Windows machine and requiring a file with a case mismatch, the build will succeed. Ex:

import foo from 'longCamelCasedFilename.js'

when the file on disk is actually longCamelCasedFileName.js. Now when they try to deploy to a service which builds the project for them on a case-sensitive file system the build will complain about the module being missing.

What is the expected behavior?

Forcing case-sensitive matches would probably break too many people, but it would be better if webpack warned the user when the case of the imported file doesn’t actually match the case of the import statement.

If this is a feature request, what is motivation or use case for changing the behavior?

This is a fairly frequent source of support tickets at Heroku, because it leads customers to believe that the service is buggy. “Works on my machine”

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

cc @hone

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:15
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
madhu131313commented, May 12, 2021

Bot can’t kill this. This is still happening and a serious issue in deployments for all our products. Please update this in future version.

In docker and kubernetes instances we use base images, where this is failing.

1reaction
ImanMahmoudinasabcommented, May 5, 2021

I can recommend using https://github.com/Urthen/case-sensitive-paths-webpack-plugin

This plugin displays an error in these cases. It’s no included by default because there are additional fs operations needed to check filenames, which affects build performance (not everyone deploys to an fs with other case semantics)

We used this plugin, after a while our project grown and this plugin takes a lot of build time. I don’t advice it.

The better solution could be when Webpack is resolving the path check them to make sure it is correct in terms of case-sensitivity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Support Guide] Netlify app builds locally but fails on deploy ...
Here is a guide to understanding how case sensitivity issues present themselves, why they arise, and how you can fix them! 1. Errors...
Read more >
PCH: Build fails in case-sensitive folder on Windows (VS2019)
Starting with Windows 10 build 17093, Microsoft introduced a new way to handle case sensitive files in Windows: per-directory case sensitivity.
Read more >
Build Forge fails to connect to case sensitive SQL Server ... - IBM
Cause. Currently, Build Forge cannot be run with a case sensitive collation and will give an error in the foreground output, like this:....
Read more >
Build failure on case-insensitive filesystem with C++20 ...
The fix I am using in MacPorts is to rename the VERSION file to VERSION.txt after extracting the source. This causes the build...
Read more >
VS Project References Broken On Case Sensitivity of GUID
We have a large solution (60+ C# projects), and were having regular issues with solution Rebuild as incorrect build order would cause failure...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found