Create-react-app: [CaseSensitivePathsPlugin] Error, parsing some folders

Created on 16 Sep 2016  路  8Comments  路  Source: facebook/create-react-app

When importing folders like FooBar/index.js like:

import FooBar from ./FooBar

generates an error.

Module not found: Error: [CaseSensitivePathsPlugin] fullpath/Foobar.js does not match the corresponding path on disk - File does not exist.

But import like this works:

import Foobar from ./FooBar/index.js.

Or if I changed the folder name to Foobar, then also work.

Here's the console script reference when I click on error:

errors: function(errors) {
        console.log("[WDS] Errors while compiling.");
        for(var i = 0; i < errors.length; i++)
                    // The below line in red underlined.
            console.error(stripAnsi(errors[i]));
        if(initial) return initial = false;
        reloadApp();
    },

Most helpful comment

I got passed this error by just killing my webpack dev-server and restarting it. No need for renaming directories or anything.

All 8 comments

Closed, as this issue was related to specific folder name

I ran into a similar error:
"Module not found: Error: [CaseSensitivePathsPlugin] /Users/xxx/code/xxx/xxx/xxx/index.js does not match the corresponding path on disk Code."
I had to rename the folder "Code" to something else to make it work. Then I changed the folder name back to "Code" and it also works.

I ran into this problem. When I looked at file structure in Folder (on Mac), the folder names weren't exactly the same as they were on my Sublime Text editor (some folder names on Sublime were capitalized but not in my Finder). I changed the import path to fit the folder structure on Finder and it worked.

I got passed this error by just killing my webpack dev-server and restarting it. No need for renaming directories or anything.

@mchandleraz thank you! This resolved it for me. When I create directories/files in Atom this seems to happen periodically, but when I make new files/dir through command line, it's not an issue.

I ran into the same issue while i was trying to import .jsx files, it got solved when i wrote the extension explicitly .jsx, or it was looking for .js extension of the same import file.

I had this same issue. Restarting webpack-dev-server fixed it.

Having same issue restarting webpack-dev-server not fixing it. :(

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Aranir picture Aranir  路  3Comments

alleroux picture alleroux  路  3Comments

ap13p picture ap13p  路  3Comments

rdamian3 picture rdamian3  路  3Comments

onelson picture onelson  路  3Comments