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

Recover from EROFS #327

Closed
frontsideair opened this issue Nov 7, 2016 · 5 comments
Closed

Recover from EROFS #327

frontsideair opened this issue Nov 7, 2016 · 5 comments
Labels

Comments

@frontsideair
Copy link

I'm submitting a bug report
I'm submitting a feature request

Webpack Version:
1.13.2

Babel Core Version:
6.17.0

Babel Loader Version:
6.2.7

Please tell us about your environment:
Linux

Current behavior:
Fails if target node_modules directory is read-only

Expected/desired behavior:
It should recover and should disable caching

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem along with a gist/jsbin of your webpack configuration.
  • Make node_modules read-only (in my case, it's generated this way by a build tool)
  • Run webpack-dev-server (in my case, create-react-app's npm start)
  • What is the expected behavior?
    It should run, without caching

  • What is the motivation / use case for changing the behavior?
    I know this is not the common use case, but out build process depends on Nix package manager, which fetches and builds node dependencies for our project in a read-only directory. When I try to run dev server, it fails since node_modules/.cache is read-only. I want it to recover as best as it can.

@danez
Copy link
Member

danez commented Nov 7, 2016

Thanks for reporting.
We currently already have a fallback to the tmp-directory if no node_modules directory could be found. We could do the same if it is readonly. Would that satisfy your usecase?

@frontsideair
Copy link
Author

I think it would work, and it would be better than my suggestion of no caching. Thanks!

@frontsideair
Copy link
Author

Is there any update or timeline on this?

@danez danez added the bug label Nov 22, 2016
frontsideair pushed a commit to frontsideair/babel-loader that referenced this issue Nov 24, 2016
@frontsideair
Copy link
Author

I spared some time to fix this myself, can you check it out?

danez pushed a commit that referenced this issue Dec 11, 2016
danez pushed a commit that referenced this issue Dec 15, 2016
danez added a commit that referenced this issue Dec 15, 2016
* fix cache directory not writable (#327)

* Fix directory fallback

Only fallback for non custom directories
Also fallback if writing fails

* add tests

* Disable tests, as they screw up node 0.10

* Remove mock tests

I cannot manage to get that reliably working, somehow mock-fs
is messing up ava/mkdirp/rimraf and makes ava hang forever on error
@frontsideair
Copy link
Author

Awesome, thanks! Now we need a release so create-react-app can use it and they can make a release.

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

No branches or pull requests

2 participants