-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Move cache dir from /.cache to /node_modules/.cache #5880
Comments
there is prior art for this as well. babel-loader does this, and a few other things i forgot about... |
This seems pretty reasonable to me... any thoughts @pieh @KyleAMathews? |
This is the module used by |
I do think we should pair such a change with |
Yeah, seems like a reasonable/good change. One problem is that some of the ".cache" folder isn't actually a cache — it's where Gatsby copies runtime and other necessary files into the project folder so they're available for requiring at a predictable place. We'll need to keep that but other cache files we could move inside |
Old issues will be closed after 30 days of inactivity. This issue has been quiet for 20 days and is being marked as stale. Reply here or add the label "not stale" to keep this issue open! |
This issue is being closed due to inactivity. Is this a mistake? Please re-open this issue or create a new issue. |
I'm trying to run gatsby on AWS Lambda and it's complaining because the only directory with write permission is What about giving the possibility to specify the cache location with an option (either as an env variable or as a cli option)? I'm happy to work on this |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! Thanks for being a part of the Gatsby community! 💪💜 |
We should do this — it's kind of a breaking change though so we should do it in v3. |
I realize babel-loader stores files in I would like to suggest serious consideration of standardizing on Please consider these points:
Gatsby should move from |
Would it be possible to make this configurable, or use https://github.com/avajs/find-cache-dir? This would give us some control over where the cache directory is located. For my use case (and I believe this might be true for most CI users), having a single, common cache directory means we can restore/preserve the cache independently from our sources without introducing any exceptional cases. |
Not every Gatsby setup will have a node_modules directory e.g if you use Yarn v2. |
There is not much value in allowing different .cache folders from our perspective. We haven't got many requests for it and it would make our code harder to maintain to make sure we write to the right folder. Thank you for suggesting it! |
Summary
Just what title says
Motivation
on most CI we can save node_modules directory to the cache I think it is better to put the cache inside node_modules because it need not more setup, and also on we can speed up netlify build
The text was updated successfully, but these errors were encountered: