Replies: 2 comments 2 replies
-
Are you importing |
Beta Was this translation helpful? Give feedback.
-
@ramonsnir I'm a little new to debugging this sort of error myself, but I've noticed that "Unexpected error while loading" category of error tends to be something that wouldn't be much further debuggable since it's a runtime evaluation happening when trying to parse your story (the loader in question would be dictated by your main.js I believe). The fact that running your app normally does not produce this issue but running storybook does makes me think the issue may lie in the difference between how your app is built when you run the app and how it is built when you are running storybook. It might be helpful to look at .storybook/main.js. In addition, you could look at what imports from |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to add Prism to some of my components. Any component that includes a call to
Prism.highlightElement(...)
disappears from the Storybook sidebar. Commenting out the call fixes the issue.I see no errors or warnings in the Storybook server logs or in the browser. How would I go about debugging this phenomenon?
Edit: I think I did something right :) I am now getting a warning in console:
Unexpected error while loading ./XYZ.stories.tsx: ReferenceError: Prism is not defined
. I'm still not sure how to proceed, unfortunately.Beta Was this translation helpful? Give feedback.
All reactions