Skip to content
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

"File does not exist" is confusing #19

Closed
gaearon opened this issue May 17, 2017 · 10 comments
Closed

"File does not exist" is confusing #19

gaearon opened this issue May 17, 2017 · 10 comments

Comments

@gaearon
Copy link

gaearon commented May 17, 2017

When I switch between branches, I often see messages like this:

Module not found: [CaseSensitivePathsPlugin] /Users/dan/p/create-react-app/packages/react-scripts/template/src/service-worker-registration.js does not match the corresponding path on disk - File does not exist.

Note how it starts with the case sensitive plugin intro, but then the real issue is that the file just stopped existing. So the message is misleading until the very last four words.

Shouldn't the plugin just bail out if a file was deleted, and ignore it? Then webpack can show its normal message about file missing.

@Urthen
Copy link
Owner

Urthen commented May 17, 2017

I could probably make the plugin detect when this occurs and completely stop attempting to enforce anything, since presumably your build is about to fail anyway. Would that work?

@gaearon
Copy link
Author

gaearon commented May 17, 2017

Yes, thanks!

@gaearon
Copy link
Author

gaearon commented May 20, 2017

I've also been getting these more often, unfortunately in cases when file does exist. (But didn't exist at some point in the past.)

screen shot 2017-05-21 at 00 56 45

Any chance you could look at this soon? I might try to roll back to an earlier version since I don't think this happened with 1.x.

@gaearon
Copy link
Author

gaearon commented May 21, 2017

I reverted to 1.1.4 which doesn't have this issue (or at least doesn't reproduce as often).
In particular, here's what reproduced it for me in 2.0.0:

  1. Import a file that doesn't exist
  2. Create that file

In 1.1.4, it compiles successfully after the file is created, but not in 2.0.0.

@Urthen
Copy link
Owner

Urthen commented May 30, 2017

I'm going to try and look at these issues this week. Sorry for taking so long, but I switched jobs and don't actually use this code anymore. I'll try to help out for those who still do though :-)

@gaearon
Copy link
Author

gaearon commented May 30, 2017

No worries 😛
Thanks for still taking a look!

@caesarsol
Copy link

caesarsol commented May 30, 2017

I think this may actually be a duplicate of #17 😄

I guess it could be enough to juste delete the FS caching code, as webpack2 has a special fs module with integrated caching (as far as I understood, please any webpack expert verify this).

I could take a look if @Urthen doesn't find the time!

@Urthen
Copy link
Owner

Urthen commented May 30, 2017 via email

@Urthen
Copy link
Owner

Urthen commented May 30, 2017

Published 2.1.0 which as you mentioned should fix both this and #17. Can you give it a test?

@Urthen
Copy link
Owner

Urthen commented May 30, 2017

Scratch that, try with 2.1.1 -- .0 had problems with older versions of node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants