Is there a way to change or disable the cache directory? #25956
Replies: 3 comments 2 replies
-
I don't see an option to change the directory, but the npm package 'find-cache-dir' is used to find the cache directory and it supports an environment variable I didn't look to see if the vite config has a place for environment variables, but I would assume so. What I tried is the following, which works, but vite gave warnings that I didn't use an absolute path. So, setting it from the config is probably better and I assume it possible. "storybook": "CACHE_DIR=\"./otherCacheDir\" storybook dev -p 6006", I didn't see an option to disable the cache, but I just briefly went through the code and may have missed it. |
Beta Was this translation helpful? Give feedback.
-
I am having a similar problem. Need to move the root directory of |
Beta Was this translation helpful? Give feedback.
-
Got the same error:
Setting up env variable |
Beta Was this translation helpful? Give feedback.
-
Summary
Hi,
I'm having some issue building the storybook because we are using Nix in our pipeline. In the way that we use it, our node_modules folder is immutable, so the error is because the storybook build process creates a .cache folder inside it.
Is there a way to change or disable the cache directory?
I've tried a couple of stuffs, but I didn't get to far. Here is the last version of my main.ts:
It's keep creating the .cache folder inside node_modules. I'm using Vite 5, Storybook 7.6.8.
Additional information
No response
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions