Comments (5)
These error messages aren't very helpful either. Complaining about Modal being undefined, and I can't even see a reference to Modal in the file it claims the error is in:
from storybook.
UPDATE: I've looked into the barrel imports (using index.js to re-export modules), and it seems to be causing issues when @storybook/addon-controls
is enabled. Even though the story only uses certain modules that are re-exported in those index.js files, I'm wondering if react-docgen scans all the other imported modules too and then somehow errors out down the line. I've tried following the import trails, but I can't even get to the file the screenshot above is claiming has an undefined modal.
It's just super weird, cause everything works fine when @storybook/addon-controls
or @storybook/addon-essentials
are not enabled
from storybook.
Also - using TypeScript, Webpack 5 and Babel here + the storybook nextjs framework
from storybook.
I've narrowed it down to be happening for the following scenario:
- @storybook/addon-essentials are added to main.ts and either
controls
ordocs
are NOT set to false (they are enabled). Disabling both of these will fix the issue - A simple Story that is importing a component/function from an index file with other imports that are unused, e.g.
import React from 'react';
import TestComponent from '@/src/components/TestComponent'; // imports from barrel file (index.tsx)
export default {
component: TestComponent,
};
export const CoolStory = (args) => <TestComponent {...args} />;
CoolStory.args = {
text: 'Hello',
};
And the @/src/components/TestComponent
import from the index.tsx file:
import AnotherModule from "../AnotherModule"; // this is not utilized or explicitly imported, but I think react-docgen analyzes it which causes the undefined module error???
import TestComponent from './TestComponent';
export { AnotherModule };
export default TestComponent;
from storybook.
I haven't heard of this issue before. One thing you can try is to turn off docgen in .storybook/main.js
:
// .storybook/main.js
export default {
typescript: { reactDocgen: false }
}
This means that you will not get autogenerated controls, but if you still want docs/controls it could be a workaround.
If you can create a reproduction at https://storybook.new or see repro docs it might be possible for somebody from the team to debug what's going on.
from storybook.
Related Issues (20)
- (LaTeST-UpDaTeD)^^How To Get Free-without human verification ✅ Coin Master Hack
- (Instant_Release)!!~ Free Coin Master Free Spins 2024😍Coin Master Free Spins 2024
- +(+*((NEW_METHOD)))+ How I Get Unlimited Spins in Coin Master!🔥 Coin Master Free Spins[ Android & iOS ]
- ++*[Today's Links]^~ Get Unlimited Spins in Coin Master! (FREE)--coin master spins link
- (LATEST-UPDATED)##Free Amazon Code ✔️✔️Free Amazon Codes 2024 || How To Get $100 Free Amazon Codes 2024 100% Working
- !>>(Exclusive+Free))> Amazon Gift Card Code ⚡️⚡️ Free Amazon Gift Cards unlimited Codes 2024
- <[[HAKING-FREE!!~]]]> Amazon GIFT CARD CODES 2024 ✔ Free Amazon Codes 2024 😳 Free Amazon Codes Live 2024
- +(+*((NEW_METHOD)))+ Free Amazon Code Gift Card ⚡⚡ Free Amazon Gift Cards Codes Unused 2024
- ~ToDaY'S<(Free) PUBG Mobile UC Generator Update 2024
- [[100%_DIGITAL]]**Free PUBG Mobile UC Generator Update 2024
- <[[HAKING-FREE!!~]]]>Pubg Mobile Free Uc Generator 2024 Method
- !>>(Exclusive+Free))> Pubg Mobile Uc Generator 2024 Updated
- ✅[FREE FOR ALL]>> FREE XBOX GIFT CARD CODES -2024 STEP-BY-STEP GUIDE✅
- [FREE FOR ALL]>> FREE XBOX GIFT CARD CODES -2024 STEP-BY-STEP GUIDE
- FREE XBOX GIFT CARD CODES [UPDATED] 50+ NEW REDEEM CODE 2024✔︎HOW TO GET XBOX GIFT CARDS FOR FREE
- **FREE XBOX GIFT CARD CODES [UPDATED] 50+ NEW REDEEM CODE 2024✔︎HOW TO GET XBOX GIFT CARDS FOR FREE
- [FREE FOR ALL]>> FREE XBOX GIFT CARD CODES -2024 STEP-BY-STEP GUIDE
- **✅[FREE FOR ALL]>> FREE XBOX GIFT CARD CODES -2024 STEP-BY-STEP GUIDE✅
- [Bug]: Backgrounds not working with Angular and MDX
- [Bug]: Cleanup logs during storybook init
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from storybook.