case-sensitive-paths-webpack-plugin icon indicating copy to clipboard operation
case-sensitive-paths-webpack-plugin copied to clipboard

Error caused by two files with same name with different case and extensions

Open anthotsang opened this issue 3 years ago • 3 comments

Module not found: Error: [CaseSensitivePathsPlugin] `/[path]/components/screener/screener.jsx` does not match the corresponding path on disk `Screener.jsx`.

This error was caused by having both a screener.json file and a Screener.jsx file. I confirmed this was the case by renaming the json file and having the error go away.

When importing, the JSON file was always imported with its extension whereas the JSX file was imported without (error did not go away even if I explicitly imported with .jsx extension).

anthotsang avatar Mar 05 '21 07:03 anthotsang

I'll take a look when I get a chance.

In the meantime, what version of the plugin are you on? There's been some internal structure changes lately.

Urthen avatar Mar 11 '21 01:03 Urthen

I have same issue, by having register directory and Register.js file in same location: Cannot find file: 'register.js' does not match the corresponding name on disk: './src/pages/Register.js'. Screenshot 2021-06-09 at 17 26 29 In App.js I want to: import { RegisterPage } from './pages/register';. RegisterPage is located under pages/register/index.js I'm using create-react-app with plugin version 2.4.0

matziol avatar Jun 09 '21 15:06 matziol

Sorry, I forgot to respond. I'm using version 2.3.0

anthotsang avatar Jun 10 '21 07:06 anthotsang