-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Upgrade to Gatsby 4 breaks Storybook #36210
Comments
Please open an issue with Storybook about this. Thanks! |
@LekoArts Can you please re-open this? This import:
Is visible in the shipped source here: https://unpkg.com/[email protected]/dist/index.modern.mjs
The relevant Webpack error message is:
Indeed, you can't import from |
For anyone who needs a workaround, add this to your root "resolutions": {
+ "gatsby-link": "4.18.1",
"lint-staged/supports-color": "8.1.1", |
It's a matter of correctly defining your webpack configuration to handle this and not immediately break on it, Gatsby's webpack config handles that gracefully. The But I'll release a new version of |
Sorry @LekoArts, I don't know what I looked at when I wrote this; I checked the types (which still come from
I agree it's possible, but IMO it's better to ship compliant ES modules that don't require custom end-user configs. FWIW, would an alternative fix have been to simply update the import statement to Regardless we'll appreciate this fix once it ships, thank you. |
You can try |
Thanks @LekoArts and @aaronadamsCA - got it working using Do you know when you'll officially release |
We release a minor every 2 weeks, so in 7 days |
Hey, @LekoArts is a release happening today? |
Preliminary Checks
Description
I've upgraded to Gatsby 4.0.0 using this guide and updated all gatsby-plugins. Builds are working as expected, but Storybook will not run and returns the following errors.
I've upgraded Storybook to latest version as part of troubleshooting and the error still occurs.
Here is
package.json
Reproduction Link
https://gatsby.dev/reproduction
Steps to Reproduce
Install from above package.json
Expected Result
Storybook compiles
Actual Result
Storybook produces above error
Environment
Config Flags
The text was updated successfully, but these errors were encountered: