Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v2] Build breaking on Netlify #8205

Closed
merelinguist opened this issue Sep 16, 2018 · 7 comments
Closed

[v2] Build breaking on Netlify #8205

merelinguist opened this issue Sep 16, 2018 · 7 comments

Comments

@merelinguist
Copy link
Contributor

Description

Build works locally, but fails on Netlify.

Steps to reproduce

Project is here: https://github.com/merelinguist/playhouse-press/pull/225

Expected result

I would expect it to build normally.

Actual result

Build works fine locally, but breaks on Netlify:

error Generating JavaScript bundles failed

  Error: ./src/components/Page/index.js
  Module not found: Error: Can't resolve '../Footer' in '/opt/build/repo/src/com  ponents/Page'
  resolve '../Footer' in '/opt/build/repo/src/components/Page'
    using description file: /opt/build/repo/package.json (relative path: ./src/c  omponents/Page)
      Field 'browser' doesn't contain a valid alias configuration
      using description file: /opt/build/repo/package.json (relative path: ./src  /components/Footer)
        no extension
          Field 'browser' doesn't contain a valid alias configuration
          /opt/build/repo/src/components/Footer doesn't exist
        .js
          Field 'browser' doesn't contain a valid alias configuration
          /opt/build/repo/src/components/Footer.js doesn't exist
        .jsx
          Field 'browser' doesn't contain a valid alias configuration
          /opt/build/repo/src/components/Footer.jsx doesn't exist
        as directory
          /opt/build/repo/src/components/Footer doesn't exist
  [/opt/build/repo/src/components/Footer]
  [/opt/build/repo/src/components/Footer.js]
  [/opt/build/repo/src/components/Footer.jsx]
   @ ./src/components/Page/index.js 8:0-31 69:29-35
   @ ./src/templates/post.js
   @ ./.cache/async-requires.js
   @ ./.cache/production-app.js


  Error: ./src/templates/post.js
  Module not found: Error: Can't resolve '../components/PostView' in '/opt/build  /repo/src/templates'
  resolve '../components/PostView' in '/opt/build/repo/src/templates'
    using description file: /opt/build/repo/package.json (relative path: ./src/t  emplates)
      Field 'browser' doesn't contain a valid alias configuration
      using description file: /opt/build/repo/package.json (relative path: ./src  /components/PostView)
        no extension
          Field 'browser' doesn't contain a valid alias configuration
          /opt/build/repo/src/components/PostView doesn't exist
        .js
          Field 'browser' doesn't contain a valid alias configuration
          /opt/build/repo/src/components/PostView.js doesn't exist
        .jsx
          Field 'browser' doesn't contain a valid alias configuration
          /opt/build/repo/src/components/PostView.jsx doesn't exist
        as directory
          /opt/build/repo/src/components/PostView doesn't exist
  [/opt/build/repo/src/components/PostView]
  [/opt/build/repo/src/components/PostView.js]
  [/opt/build/repo/src/components/PostView.jsx]
   @ ./src/templates/post.js 5:0-46 16:26-34
   @ ./.cache/async-requires.js
   @ ./.cache/production-app.js

Environment

  System:
    OS: macOS High Sierra 10.13.6
    CPU: x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.10.0 - ~/.nvm/versions/node/v10.10.0/bin/node
    Yarn: 1.9.4 - /usr/local/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v10.10.0/bin/npm
  Browsers:
    Safari: 11.1.2
  npmPackages:
    gatsby: ^2.0.0-rc.25 => 2.0.0-rc.25 
    gatsby-plugin-react-helmet: ^3.0.0-rc.1 => 3.0.0-rc.1 
    gatsby-plugin-styled-components: ^3.0.0-rc.5 => 3.0.0-rc.5 
    gatsby-source-filesystem: ^2.0.1-rc.6 => 2.0.1-rc.6 
    gatsby-transformer-remark: ^2.1.1-rc.5 => 2.1.1-rc.5 
@KyleAMathews
Copy link
Contributor

This is because you have a case difference in what you're requiring and the name of the file. This works in Macs and doesn't for Linux.

@pedrouid
Copy link
Contributor

pedrouid commented Dec 6, 2018

I was also riding in circles around this same issue.

This solved it for me:

git config core.ignorecase false

I've never had issue with case-senstive file name changes.
Either it was just a coincidence or this is part of the Gatsby v2 Starter??

andrashari added a commit to andrashari/netlfy-cms that referenced this issue Jan 13, 2019
@Alfrex92
Copy link

Alfrex92 commented Mar 2, 2019

I had the same problem, I fixed by manually changing the imports.

Before:
import Features from "../components/features/features";
After:
import Features from "../components/features/Features";

Credits to talves on StackOverFlow

@GlynL
Copy link

GlynL commented Mar 28, 2019

Just ran into the same mistake. Shouldn't this be something that produces an error in development?

SeanKilleen added a commit to SeanKilleen/BeABetterMan.online that referenced this issue Jun 24, 2019
so that it will work on netlify. gatsbyjs/gatsby#8205
KarstenBuckstegge added a commit to KarstenBuckstegge/karstenbuckstegge-gatsby that referenced this issue Oct 7, 2019
by adding case sensitivity config to git
gatsbyjs/gatsby#8205
shianpoon added a commit to shianpoon/lvlzeros.github.io that referenced this issue Oct 13, 2019
Used ```git config core.ignorecase false```

Ref: gatsbyjs/gatsby#8205
@gatsbyjs gatsbyjs deleted a comment from x5engine May 2, 2020
atapas added a commit to atapas/gatsby-bugfender that referenced this issue Dec 17, 2020
@LukeVibes
Copy link

Just wanted to note- had the same error- remember to to a full rebuild after applying git config core.ignorecase false that @pedrouid so wonderfully recommended. This usually means "clear cache and rebuild" for Gatsby Cloud and Netlify. Might seem obvious but thought I would mention it anyway :)

Geerodge added a commit to Geerodge/georgemc.net that referenced this issue Jul 26, 2021
Changed manually because file name case sensitivity issue, see here: gatsbyjs/gatsby#8205
Geerodge added a commit to Geerodge/georgemc.net that referenced this issue Jul 26, 2021
Changed manually because file name case sensitivity issue, see here: gatsbyjs/gatsby#8205
@shreyashah115
Copy link

git config core.ignorecase false

This saved my life. Thanks!

scottnuma added a commit to pioneers/website2 that referenced this issue Aug 24, 2021
- Apparently macOS isn't case sensitive, but Linux is
- See gatsbyjs/gatsby#8205
scottnuma added a commit to pioneers/website2 that referenced this issue Aug 24, 2021
- Apparently macOS isn't case sensitive, but Linux is
- See gatsbyjs/gatsby#8205
scottnuma added a commit to pioneers/website2 that referenced this issue Aug 24, 2021
- Apparently macOS isn't case sensitive, but Linux is
- See gatsbyjs/gatsby#8205
@TheJazzDev
Copy link

I was also riding in circles around this same issue.

This solved it for me:

git config core.ignorecase false

I've never had issue with case-senstive file name changes. Either it was just a coincidence or this is part of the Gatsby v2 Starter??

You are a legend... thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants