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

Default to node_modules/.cache for cacheDirectory #2231

Closed
hzoo opened this issue Dec 6, 2016 · 3 comments
Closed

Default to node_modules/.cache for cacheDirectory #2231

hzoo opened this issue Dec 6, 2016 · 3 comments

Comments

@hzoo
Copy link

hzoo commented Dec 6, 2016

Noticed when debugging facebook/create-react-app#1179?

my suggestion is using https://github.com/avajs/find-cache-dir

const findCacheDir = require('find-cache-dir');

findCacheDir({name: 'unicorns'});
//=> '/user/path/node-modules/.cache/unicorns'

We added it to babel-loader via babel/babel-loader#301 although later a fallback to os babel/babel-loader#318

@thymikee
Copy link
Collaborator

thymikee commented Dec 8, 2016

@hzoo I wonder if this is related – #2141? Looks like it would solve the issue with permissions.

@thymikee
Copy link
Collaborator

Hmm, I'd prefer not to make this change. We used to store the cache inside of node_modules/jest/.haste_cache and we had a ton of problems, like watchman would crawl this and then get out of sync and a ton of other tools at FB on all codebases would go mad with this. It should be easy to set "cacheDirectory": "/node_modules/.cache/jest" or something
~ @cpojer

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants