file does not match the corresponding path on disk – File does not exist

I’m reporting a bug.

What is the current behavior?

When I change files (recompiled in a linked package), webpack chokes with

Error in ./src/index.js
Module not found: [CaseSensitivePathsPlugin] `some file.js` does not match the corresponding path on disk - File does not exist.

 @ ./src/index.js 29:16-36

What is the expected behavior?

I’d expect webpack to just happily restart.

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

I’m using webpack 1.13.2 and server 1.16.1.

I filed this issue with the app I’m working on at

Author: Fantashit

13 thoughts on “file does not match the corresponding path on disk – File does not exist

  1. It is may not be a webpack issue, did you try restarting webpack-dev-server? if yes is it woking after that?

  2. I am having the same issue with React. I created an app using create-react-app, and am not using webpack to compile. I have tried renaming the React node package, deleting it, reinstalling it, and the same error continues. Therefore, maybe it isn’t a webpack issue? Using node v8.9.1, React v16.2.0

    EDIT: This was an error of mine, and I believe that I was trying to use the statement import React from "React" instead import React from "react". Also, it may have been an issue that I added react using npm instead of yarn.

  3. check the pass of remote and your local system be same if you have capital S in Src path change it to small.
    Error in ./src/index.js

  4. ./src/Pages/PlayQuiz.js
    Module not found: C:\Users\abc\project\client\src\Components\Comments.js does not match the corresponding path on disk components.

    @Farbod29 I got the same error on my project when I run.

    anyone help or suggest something what shall I do?

  5. Hallo,
    any hints how I can solve this issue with localhost? I cannot open my react app

    Failed to compile
    Cannot find file: ‘index.js’ does not match the corresponding name on disk: ‘./node_modules/React/react’.

  6. I had the same issue. It was because I used small case in folder name in my import statement. When in fact it should have been upper case.
    Replaced “import Layout from ‘./component/MainLayout’; to
    “import Layout from ‘./Component/MainLayout’; worked for me.

Comments are closed.