[Background] The react project encountered an error as shown in the following figure:

Searched the net along while, the answer format is various, finally through “dichotomy” – delete code to step positioning, found the cause of the problem – file case reference problem!

This problem is difficult to locate for the following reasons:

  1. Debugging is not easy – because local development (on MAC systems) is fine, but deployment to a Linux test environment is problematic.
  2. Error prompt unfriendly – you can’t know exactly what went wrong.

Returning:

After analysis, the reason should be because the local development, MAC is not sensitive to file name case, while Linux is sensitive to case, so there will be no local problem, the test environment has problems.

Universal solution

The dichotomy, if it was good before, is located by deleting the code.

【 the 】