-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
error with cache when running storybook #13795
Comments
I have the same issue too. |
I'm able to temporarily resolve this with:
...and then it works again... until it doesn't. |
I have had the same issue several times. Removing the storybook cache in node_modules solves the problem. Seems like cached json could be not valid somehow, not sure its storybook's problem or npm to blame. Maybe wrapping JSON.parse in try/catch block would prevent such runtime exceptions. |
Does anybody have a repro in which this happens frequently enough to debug it? |
Same, doesn't happen often tho in my experience. Confirm removing node_modules/.cache/storybook works |
https://github.com/adarshpastakia/snail-ui this project fails all the time on rebuild, i however have another project https://github.com/adarshpastakia/ant-extensions where it doesnt fail and both repos are using 6.1.20 what i did find is that in not sure if this helps but in the projects that work when started this file contains |
found the culprit I think ;) either way it seems to be working now, downgrading |
I hit this problem several times on day one of trying to integrate this with an existing Next app. Hard deleting cache fixes it but the issue came right back several times with little more than basic edits to Storybook files. |
@balibebas can you try the latest 6.2 RC? we recently made some changes that could be relevant
|
I am using Storybook v5 with (webpack v4) and nothing helped, not even deleting I've tried to delete the Only deleting the entire project, killing the terminal instance (and all IDEs) and then cloning the repo and re-installing worked. Black magic :) |
I'm getting the same issue as well. There's definitely cache manager involved. Removing cache folder inside node_modules/.storybook seems to be fixing the error until I run storybook the 2nd time. |
I'm also getting the same error, except it happens every time, even after deleting the .cache folder. I haven't been able to find a workaround. I've tried starting from scratch with a brand new CRA and the latest Storybook (6.5.8) several times and using also trying different versions of storybook (6.5.0 and 6.0.0, and 7 prerelease with no luck). Steps:
I'm on Windows 10 Pro. I also tried executing 'npm run storybook' with VSCode closed, but I got the same error. info => Loading presets [Error: EBUSY: resource busy or locked, open 'C:\Users\bkelley\repos\storybook-test\node_modules.cache\storybook\dev-server\325c8f456729b912b0d2134054eb7448-41ac79ddc5290d504ad69ef1fe8200a7'] { Any workaround suggestions would be really appreciated! |
Same error here setting up a fresh project. Been looking for alternatives as I haven't been able to find a solution yet |
My colleague have similar problem on Windows 10. On MacOS everything works fine. |
Same problem here on MacOS M1. |
Got this on a Windows machine at work and it looked like the cache file was getting locked by Windows Defender. Is there any way to disable that particular caching mechanism? |
@Tiberriver256 Thanks for the tip. Meanwhile changing cache type to memory does the trick for me.
|
I modified my package.json to "storybook": "start-storybook -p 6006 --no-manager-cache", And can run storybook now. (had the cache error continually before) Edit: No only worked for one run then same problem returned |
I ran into the same issue (the After digging into it a bit, it appears this line in
I suspect that this method is hammering the file system and either overloading it or Windows Defender is stepping in due to "suspicious" file system hammering or something 🤷♂️ I was able to work around this in a pretty hacky way, but it did enable me to run storybook. In my project's module.exports = {
managerWebpack: (config, options) => {
options.cache.set = () => Promise.resolve();
return config;
}
} Perhaps a better workaround would be an option to disable all caching in case future uses of the cache cause similar issues. A real fix might be to update progress-reporting to hammer the file system less (perhaps debouncing or throttling?) or rework progress-reporting to not rely on file system at all if possible. Cheers! :) |
Your solution fixed right away my problem. Thanks! |
@andrewiggins your solution worked for me too, I got "UNKNOWN" error every time. I spend hours trying to solve it. |
developers who use vue 3 and vite should to remove sudo rm -rf ./node_modules/.cache/.vite-storybook |
@shilman this issue is still present in Storybook 7.0.24 |
I have been running storybook 7.0.20 and I get the same issue on a work laptop. |
To respond to @duncan-s-white's hypothesis, I'm having the issue with |
[email protected], Having this consistently on fedora, vue3 project. It complains about broken JSONs in cache, like so:
Removing cache directory doesn't help. |
This issue is a strange and very frustrating one, and has stopped us being able to use the software so far as it just isn't viable for use as a development tool when it is crashing locally so often, almost always 6-9 file saves / hot reloads. I saw a comment on the other now closed thread from @thuraua that a clean install with Vite instead of webpack didn't have this issue and seemed quicker, both of which seemed to be true for me when I installed it. However I did read that it is not ideal to have sb running using vite and your project that will consume the components running with webpack due to the potential difference in configuration e.g. I had noticed that environmental variables are dealt with differently. The last things I tried to change but all with no luck in the main.ts file were switching all caching options to false: I wondered should it even be reading from the I think I am going to go down the route of using the Vite builder, as the only other viable alternative was to downgrade to 6.5 and use the work around for this that uses the managerWebpack method which no longer exists in sb7. |
Hi there! Thank you for opening this issue, but it has been marked as |
I'm afraid we need to close this issue for now, since we can't take any action without the requested reproduction or additional information. But please don't hesitate to open a new issue if the problem persists – we're always happy to help. Thanks so much for your understanding. |
Trying to migrate from Vite to Webpack to use https://storybook.js.org/recipes/next, but constantly running into this locked or busy error. Solution nowhere to be found. All webpackFinal, caching: false options etc are not working. Any more tips? |
Can someone provide a reproduction with the latest version of Storybook 7? |
@valentinpalkovic No reproduction yet, but I believe #23189 and #18520 have the same root cause. |
Still happening in Storybook 8 and the frequency renders the Storybook / Vite combination unusable. |
that works for me! thnks @daniloab
|
I had this problem specifically when trying to run my new project using Google IDX. The project worked as expected on my Mac locally. The reply by @duncan-s-white gave me some direction. I'm using [email protected]. // main.ts
const config: StorybookConfig = {
core: {
builder: {
name: "@storybook/builder-vite",
options: { fsCache: false } // this solved it for me
},
},
} |
Sometimes when running the storybook, breaks and only works after removing the cache
error
command used to remove all cache
System
The text was updated successfully, but these errors were encountered: