-
Notifications
You must be signed in to change notification settings - Fork 27.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
next/Image component not working inside Storybook #18718
Comments
This looks like a duplicate of #18393 |
Hmm, duplicate indeed, but what is suggested there seems to be to use a next plugin which Vercel says shouldn't be used:
|
Is there any solution for this one? |
This comment has been minimized.
This comment has been minimized.
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
If you want to use a storybook to assist in the development of components and one of the components happens to use the new
Image
-component than storybook will return an error.Describe the bug
A runtime error is thrown when trying to navigate to a story of a component using Next's
Image
-component:To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
npm run storybook
Expected behavior
I would expect to be able to use the Image-component without the error being shown:
If I remove the
Image
-component the story loads without errors.I have made a repo which reproduces the problem of storybook not working as expected I am not getting the exactly same error as above but it behaves similarly by not showing the WidgetCard story at all
Screenshots
N/A
System information
Additional context
I am using the following storybook
main.js
file:The text was updated successfully, but these errors were encountered: