-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entry module not found: Error: [CaseSensitivePathsPlugin] #472
Comments
OK, so if I create the app inside a different directory that's all lower case it works fine 😄 Not sure if I should close this, or leave it open - thoughts? |
I think it’s better to create the project inside another directory. The watcher can get tripped by some special directories, and doesn’t detect the changes inside them. I added the plugin to warn in such cases. |
That said the error message is very funny (“child compilation failed”, wat). |
Not sure what you mean by 'special directory' but I just created in my regular directory that I have all my git projects in. Just happens to start with a capital P. |
Can you reliably reproduce this with any folder that starts with a capital letter on Windows? cc @Urthen for thoughts/discussion |
@richkeenan Is there any reference to the 'Projects' directory as lower case in your project? The case-sensitive-paths-webpack-plugin is supposed to only detect when you inadvertently use the wrong case on an import, but without seeing your code, I couldn't say for sure where it is coming from. |
Looking through the code a little bit. "Child compilation failed" comes from html-webpack-plugin itself. The errant spacing looks like it's just an oddity between the console and what appears in the browser - a space appears whenever there is a line break in the console. I'm only able to reproduce the "bug" on my machine if I deliberately change what is in paths.js to a differently-cased filename, for example I don't myself develop with create-react-app nor Windows, sorry I can't be more help. |
That’s what I’m thinking. (Maybe it always lowercases?) |
@richkeenan You might try going into node_modules/react_scripts/config/webpack.config.dev.js and throwing in a quick You'll have to scroll up in your console to see it because create-react-app clears the console window before compilation. |
This probably won't work on Windows but you can comment out this line to keep the output. |
I've tried on a few new directories, some with Upper Case some with lower. They all work fine - it just seems like my original ( Ima try that |
The output from the console log is
Which looks legit apart from the lower case . There's an error line at the bottom,,
|
Hrm - so it's definitely requesting the incorrect case. This indicates some |
Node version 6.4.0 But I was using Node v4.something when I produced the bug originally. I updated thinking it might help |
Ooohhh! I found why it was inconsistent 😄 I'm using git Bash, if I
It works. If I
It doesn't work! |
Having narrowed down the git bash path upper/lower difference I've tried on some new directories with upper and lower case and they all behave consistently: If the directory on disk starts with Upper Case, but I |
Ok. Well, at least we know the issue. Looks like the current directory, even if the wrong case, is being used in @gaearon I might be able to check for this specific edge case in my plugin to better clarify the exact cause of the error, think it'd be worth it? |
Yea it's defos |
As an experiment I tried using
This prints the path that's on disk - so it doesn't matter whether I've If I hack this into
This allows the app to start up fine 😃 I'd be happy to do a PR if you're interested? Although I'll need a little help with knowing which package.json needs to change! |
Seems like |
It's not so much a problem with While looking at Best I can imagine doing is to update the plugin to attempt to intelligently ignore cases where the path case matches what is in process.env.pwd, even if it doesn't match what is on disk. I am able to replicate at least this portion in OSX (incorrectly cased PWD) so I should be able to get an update to the plugin soon. |
I still don’t understand. If user |
Haha thanks a lot. |
Likely fixed by #593 and will be out in 0.4.2. |
This should be fixed in 0.4.2. |
Tested on 0.4.2. Looking great!. Thanks folks |
This still happens on Mac with version 1.0.3. |
What is the actual case of the path on disk? |
Maybe because that's how the folder named on the disk? Then the plugin is working as intended: preventing inconsistencies which break other tools. |
I checked the path on disk, it's correct, Capital first letter, 'Components'. But it does not work untill I rename it to lower 'components'. |
Maybe it's a first-time use issue. I tried to rename the 'components' folder back to 'Components' folder, and it works now. |
I don't think it's a first-time use issue. My app is under a sub directory of a folder called "Code", and the app runs fine for a long time until once day I ran into this error: |
Is the issue that you've committed the code in one case, then switched cases, and now it doesn't work on another machine? I've run into that before due to a issue/bug with Git on case-insensitive platforms, where Git won't properly commit a case change unless you explicitly tell it to. The build works fine locally, but on other machines the old case is used and therefore the build fails due to the plugin detecting incorrect case. |
It's not git related. For me, it happens after I first create the project using 'create-react-app', and create a new 'Components' folder under 'app'. I didn't introduce git into it yet. |
Can you send the entire error message as well as the exact path (Run 'pwd'
in shell on *nix based systems)?
It sounds like something, somewhere is expecting you to have it lower
cased, and using upper case in the folder name is triggering the plugin.
…On Mon, Jan 23, 2017 at 8:00 PM zhangchf ***@***.***> wrote:
It's not git related. For me, it happens after I first create the project
using 'create-react-app', and create a new 'Components' folder under 'app'.
I didn't introduce git into it yet.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#472 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAb_duXIZa8DzYZseSE1nY9_jcEKVuTWks5rVVtEgaJpZM4JqIft>
.
|
Sorry I just realized it is with react-native, but not react-js itself. |
Experienced the same issue using react-create-app and attempting to import styled from 'styled-components' . Fix was as others have said moving the entire project to a lower case directory (C:\lowercase\app ...etc) |
This happens on OSX when creating a project in the home directory ( The workaround is to |
@jesstelford That's strange, I and my entire team run it on OSX under the home directory with no issues. I just even checked with |
I am getting a similar error as the first person who opened that issue. Just installed the create-react-app and tried to create an app. Path that do not work: (I'm also getting those suspicious white spaces in the error messages. Path that works: On windows 10 |
Just happened to me, renamed a folder to lowercase and it worked, but I'm not sure if that was actually what fixed it. It was after installing the |
Happened again after installing another module. Stopping and re-starting the dev server fixes it. |
I published case-sensitive-webpack-modules-plugin@2.1.1 which may fix some of these issues. Need people to try it out locally before I open a PR to add it to create-react-app |
@Urthen has this been fixed? I just ran into the issue on v2.1.1 |
@stramel You're the first to report it not working, what error are you seeing exactly? |
Doesn't work for me on
(ellipsis mine) |
Hrm, that's definitely a first. Was a file or folder named 'Upload' ever in the folder path anywhere, either on disk or in a require? Is there a symbolic link or anything that might confuse it? The code uses the standard path.basename() and path.dirname() functions to grab file/folder names, and webpack's built in inputFileSystem to grab file names, so I'd be surprised if it was parsing paths incorrectly - but you never know what's happening. |
We found the issue — the folder called “Upload” had been renamed to
lowercase “upload,” and the require paths changed, however since macOS is
case insensitive the change never appeared in a git diff and so never got
committed, and when I cloned the repository it still had a folder named
“Upload” even though the require paths had been changed to read “upload.”
…On Tue, Jul 17, 2018 at 11:34 AM Michael Pratt ***@***.***> wrote:
Hrm, that's definitely a first. Was a file or folder named 'Upload' ever
in the folder path anywhere, either on disk or in a require? Is there a
symbolic link or anything that might confuse it?
The code uses the standard path.basename() and path.dirname() functions to
grab file/folder names, and webpack's built in inputFileSystem to grab file
names, so I'd be surprised if it was parsing paths incorrectly - but you
never know what's happening.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#472 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJ5Yrw_jBRIoI5ar4wNmPIw_pxmKHErbks5uHgPrgaJpZM4JqIft>
.
|
Ah, yeah, that's definitely been a problem before - and exactly why the plugin exists! |
Hi folks,
I'm getting a compilation error after following the tutorial and running
npm start
insidemy-app
.There's some really suspicious whitespace in the middle of the path, not sure if relevant.
Environment:
Windows 10
Node version 6.4.0
npm version 3.10.7
project path, C:/Users/myuser/Projects/create-react-app/my-app (The
Projects
directory has a capital P which could be relevant)The text was updated successfully, but these errors were encountered: