-
-
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
Webpack - Module not found Error Can't resolve '.storybook/preview.js-generated-config' #19927
Comments
Hey @rtturner thanks for opening this issue and investigating! A few hours ago, there was a release of enhanced-resolve v5.11.0, which ended up breaking Storybooks that use Webpack. You might be experiencing this issue if you:
We notified the maintainers here, please upvote: webpack/enhanced-resolve#362 In the meantime, the workaround is to pin the version of npm (if you're using npm 8 or higher) {
"overrides": {
"enhanced-resolve": "5.10.0"
}
} Yarn {
"resolutions": {
"enhanced-resolve": "5.10.0"
}
} pnpm {
"pnpm": {
"overrides": {
"enhanced-resolve": "5.10.0"
}
}
} |
I just did a fresh install of storybook and I'm running into an issue implementing this fix as there is also a dependency on webpack4 coming from "@storybook/[email protected]" that relies on "enhanced-resolve@^4.5.0" so setting a global resolution seems to break that dependency |
repro:
Check the lockfile, there is enhanced-resolve@^4.5.0 and enhanced-resolve@^5.10.0 called out https://github.com/pm0u/storybook-enhanced-resolve-repro
|
the following resolved the above error for me (yarn): package.json "resolutions": {
"webpack@5/enhanced-resolve": "5.10.0"
} edit: I'm not a yarn wizard, but possibly better: "resolutions": {
"webpack@>=4.43.0 <6.0.0, webpack@^5.9.0/enhanced-resolve": "5.10.0"
} This more closely matches the package definition that is pulling in this package |
Same issue after fresh install. The override didn't work for me unfortunately, while I'm on NPM 8+. A workaround if the override above not work is to comment out
In Edit: |
I started getting a simular error after a fresh install.
This resolved it for me (yarn)
Thank you @pm0u |
Please, please publish a new version of storybook with fixed version of broken package 😢 |
This issue has been addressed by a new release of We've confirmed that it works in a few sample projects, but please let us know if you continue to experience problems. |
New release fixes the issue. 😄 ❤️ |
First: This issue (yes urgent!) is actually resolved! It's not just closed "without further ado" that's simply not true. Hey @wojtekxtx I'm sad to hear you feel this way. As a storybook maintainer it's never a great moment when a user voices their displeasure. But it happens, I understand. You feel somehow that this is our fault, that we should do better. We try, but you know, sometimes building a project such as storybook, standing on the shoulders of giants, it's a blessing and a curse. We would not be where we are today without those giants! But these giants are moving, and new giants get created to stand upon. I'm talking about webpack, which is exactly what this issue is about. Users want to use webpack, we support it; we have to. Within 1 hour after discovery we had a PR up fixing the issue at the origin, we had ping'ed the author of the PR breaking and the package maintainer on multiple platforms. The storybook team works hard to keep up with the ever changing landscape of bundles (new versions get released, new bundles come unto the scene) new UI frameworks, breaking changes in existing ones (hello react 18!). We try to support it all. It's a lot and complex work. If you're looking for alternatives to storybook, there are a few actually. There's https://github.com/doczjs/docz https://previewjs.com/ https://react-styleguidist.js.org/ and a bunch more. You mention that storybook has tons of open issues, and you're right. I feel guilty about this all the time. I hope that whatever you do, whatever tool you use, fits your use-case, and makes your development better and more fun. And if you ever feel like helping out with existing issues, I'd be happy to guide you on how to get started contributing in a 1-on-1 zoom meeting any time: https://calendly.com/chromaui <- schedule a meeting with me, and I'll show up. |
Very happy with the quick response time. Thanks! |
I do not appreciate your tone of voice @wojtekxtx You say you are still having this exact issue? please supply a reproduction. You say when you were trying this 4 hours ago you ran into a list of issues, please list them. You suggest we drop all existing code, and rewrite from scratch; uprooting the entire user-base, dropping backwards compatibility, giving users a very hard time waiting for this rewrite and then when it lands, migrate. You seems to be of the impression that the storybook team is required to read all issues for you, is required to fix all bugs for you. You're acting in a way that makes open source maintainers lose interest and burn out. Please stop. You might think you comment is helping, but it's not. It's fine if you feel like an open source is not for you, but you should not go around open source project you don't like and actively try to make their maintainers feel bad. If I see another toxic message from you, I'd feel forced to use the code of conduct, this message is a |
😮 sorry to ping a closed issue but just wanted to give thanks to the storybook team - you guys rock - real bummer this issue exploded into a temper tantrum but think you handled it well. Hope you all have a good holiday and happy new year 😄 |
just FYI: I fully agree with @wojtekLs, there's a mess and in my opinion his feedback was constructive. |
Describe the bug
Earlier today I started having issues trying to build storybook. Receiving an error complaining about not being able to resolve
.storybook/preview.js-generated-config-entry.js
. I assumed it was something in our codebase but trying many older commits that were working is still failing.I noticed that the latest commits in storybook were failing this check: ci/circleci: build-sandboxes
The error message within that check is very similar to what I am seeing.
Curious if this is a storybook issue
To Reproduce
No response
System
Additional context
No response
The text was updated successfully, but these errors were encountered: