Problem with create-react-app absolute imports

I am trying to auto-publish my react project.

But, netlify raises below error. Its really basic cra app, only jsconfig.json file has very basic options (see below). Not sure what is the problem. Build is successful all the time in my local computer.

Anyone having similar absolute import issues?

BUILD LOG

10:32:13 PM: yarn run v1.3.2
10:32:14 PM: $ react-scripts build
10:32:15 PM: Creating an optimized production build...
10:32:23 PM: Failed to compile.
10:32:23 PM: ./src/App.jsx
10:32:23 PM: Cannot find module: 'views/Articles/ViewArticleDetail'. Make sure this package is installed.
10:32:23 PM: You can install this package by running: yarn add views/Articles/ViewArticleDetail.
10:41:11 PM: Canceling deploy

JSCONFIG.JSON

{
  "compilerOptions": {
    "baseUrl": "src"
  },
  "include": ["src"]
}

If I had to guess it’s around case sensitivity as mentioned in our build-gotchas doc:

I’d suggest (as that article does) standardizing on lowercase filenames since that is generally the unix (where we build your site, regardless of where you develop) standard.

1 Like

Thanks for the reply, missed that gotchas section.

After executing below command and committing changes, everything worked perfectly good.

git config core.ignorecase false

Thanks.

1 Like