My netlify build is failing because it cannot resolve the Layout component in …/…/Layout
The app works in development
4:04:28 PM: Can't resolve '../components/Layout' in '/opt/build/repo/src/pages'
4:04:28 PM: If you're trying to use a package make sure that '../components/Layout' is installed. If you're trying to use a local file make sure that the path is correct.
However the name of the folder is layout with a small “l”, so why is Netlify looking for a “Layout” folder with a capital L
Is there a way to turn off Netlify’s case sensitivity?
Renaming the folder to Layout with a capital L will break the application as all the files point to a layout folder with a small l.
Hi, I read all that but the problem is that the build checks for layout.js AND Layout.js - and if it is missing just one of them, the build doesn’t work. Netlify should only be checking for one out of those two files.
All of the solutions on that Stack Overflow do not work for me.
The only solution I found was to duplicate layout.js as Layout.js and keep both files - that is the only thing after hours of trying solutions that worked.
Therefore I do not believe the error is caused by a “case-insensitive” system but rather Netlify checking for more files than it should be checking for.