case-sensitive-paths-webpack-plugin
case-sensitive-paths-webpack-plugin copied to clipboard
Error caused by two files with same name with different case and extensions
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).
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.
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'.
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
Sorry, I forgot to respond. I'm using version 2.3.0