Open luked177 opened 1 year ago
Hi @luked177, this is an interesting issue. Try the following workaround instead:
module.exports = {
...
webpack: (config, options) => {
options.cache.set = () => Promise.resolve();
return config;
}
};
We no longer have a managerWebpack
API in SB7, but it looks like the workaround has nothing to do with webpack really and is just disabling the cache object, which is locking up on your machine somehow.
The underlying issue probably still exists & if you provide a reproduction we'd be happy to take a look at it. Go to https://storybook.new or see repro docs. Thank you! 🙏
I have a similar issue.
Expected Behavior To run through npx storybook@latest init and npm run storybook on a new project and have something work. As documented on https://storybook.js.org/docs/react/get-started/install
Actual results Similar error thrown to this case as shown in Appendix One
Unfeasible work around Opening Windows Security and disabling real-time protection will allow storybook to start. Re-enabling real-time protection will cause the problem to occur again. This is not feasible, as NPM packages should not be automatically trusted. It would be nice if Storybook waited a short moment for the file to be no longer locked
Interim work around
Putting in the following code, works around the problem. However, caching is a desired feature, so this is only an interim solution
module.exports = { ... webpack: (config, options) => { options.cache.set = () => Promise.resolve(); return config; } };
Appendix One
`10% building 0/1 entries 0/0 dependencies 0/0 modulesnode:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
[Error: EBUSY: resource busy or locked, open 'C:\xxxxx\node_modules\.cache\storybook\dev-server\a5a8bf6e622aef57065c6498611f40c911543d7d-a21314dc303cf26dabba6bf4a8fd381e47e44e94'] {
errno: -4082,
code: 'EBUSY',
syscall: 'open',
path: 'C:\\xxxxx\\node_modules\\.cache\\storybook\\dev-server\\a5a8bf6e622aef57065c6498611f40c911543d7d-a21314dc303cf26dabba6bf4a8fd381e47e44e94'`
Describe the bug
We recently upgraded to Storybook v7 and now some of our team are struggling to run the updated version of Storybook. We previously had this same issue in v6, however the fix stated in this thread Issue19336 worked for us until now with the upgrade to v7 :(
To Reproduce
Run npm run storybook after upgrading to v7
System
Additional context