-
-
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
ArgsTable of={Component} cannot find propTypes #18137
Comments
Yeah, I can't get this to work either. Not doing anything fancy. :\ |
+1 |
Same thing here! |
We've got a scenario right now where this is happening for a single new component in a storybook with dozens of other components that we've been building for years, and it's only happening for about half of the people who've checked out the repo and tried it locally. Lots of eyes have been over it so far and there really don't appear to be any errors in the files. The component whose props we're trying to show in the |
Do you a have a reproduction repo you can share? If not, can you create one? See how to create a repro. Thank you! 🙏 |
Having the same issue during a migration to v7 from v6. BTW, i've seen the deprecation warning:
So i tried the |
@sag1v In the component whose Truly bizarre one that we solved out of pure luck/trial and error. |
Thanks for letting me know. Unfortunately this is not the case for us. |
@jasongaare Did you ever solve this issue? i'm still struggling to find a solution (or to reproduce with a clean sandbox). @shilman Its really hard to debug this as we don't have source-maps. Is it possible to publish the latest version as an "alpha" or something but include source-maps? |
We never did find a solution. We currently manually define all our prop types and feed them to an ArgsTable that way |
@jasongaare What version of react do you have? |
I think I've managed to reproduce this issue (finally!!!). It turns out, that whenever there is a babel config e.g: See this sandbox. When removing the preset it works fine. CC @shilman |
UPDATE Screen.Recording.2023-05-23.at.14.07.04.movNot sure what is this black voodoo all about 🤷 |
Describe the bug
I've followed directions outlined here #12576 to export my wrapped components directly, however my
<ArgsTable of={Component/}>
component still renders that "No inputs found for this component"However, when I console.log the component itself, the propTypes + defaultProps seem to be plainly available.
The way I read this, it should "just work"?
Screenshot
I've scoured the issues here, tried various webpack configs, babel configs but nothing seems to clear my issue. I'm working in a monorepo with Expo + React Native + React + storybook, so there's likely some wires crossed somewhere.
System
Please paste the results of
npx sb@next info
here.Click for System Info
Environment Info:
System:
OS: macOS 12.3.1
CPU: (10) x64 Apple M1 Pro
Binaries:
Node: 12.22.0 - ~/.nvm/versions/node/v12.22.0/bin/node
Yarn: 1.22.18 - /opt/homebrew/bin/yarn
npm: 6.14.11 - ~/.nvm/versions/node/v12.22.0/bin/npm
Browsers:
Chrome: 100.0.4896.127
Firefox: 100.0
Safari: 15.4
The text was updated successfully, but these errors were encountered: