-
Notifications
You must be signed in to change notification settings - Fork 6
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
react-docgen no longer has react-docgen/dist/babylon #5
Comments
Great catch! Do you know the replacement for it? |
The replacement is: I guess doing this should make it possible for old and new versions to work: let babylon
try {
babylon = require(`react-docgen/dist/babelParser`).default
} catch (e) {
babylon = require(`react-docgen/dist/babylon`).default
} |
Thanks @danez for following up on this. @siddharthkp any chance we can get an updated version with the changes so we can upgrade react-styleguidist without issue? |
Thanks @danez ! It fixed my issue but now, docgen return an empty object for every components that require an external variable to define some proptypes |
Any movement on this one gentlemen? |
@reintroducing I personally downgraded react-docgen to a stable version until a fix is found for react-docgen >v3 |
Okay, thanks. |
Okay fixed in 1.0.1. |
Hmm, I just updated and while it does compile, there are now errors for the components that had the setup like I mentioned here: #1 I can actually fix the errors by destructuring the propTypes like so:
However that doesn't actually fix the propTypes listed in the style guide. Prior to update: https://www.dropbox.com/s/yhh131i6fvxeqj8/Screenshot%202018-12-13%2007.59.33.png?dl=0 After update: https://www.dropbox.com/s/znok10q5ruwvslw/Screenshot%202018-12-13%2007.59.55.png?dl=0 Post update, only the defaultProps show. Any idea whats going on? |
Can you try again with 1.0.2? It should work now. Sorry for the mistake. |
@danez Please don't be sorry, you're helping out on an OSS project, I really appreciate you even taking time to do this. As for the update, it fixed most of the components that were erroring last time except one. The new error I now see in that component is That component's propTypes are simply |
@reintroducing did you ever get this resolved? Keep running into issues you've ran into in some of these GH Issue threads. I'm trying to import and destructure propTypes into my component but I'm having trouble documenting those propTypes in Styleguidist. Example of what I'm trying to do: |
@coreybruyere unfortunately no, and i've just stayed on v8.0.4 of react-styleguidist as a result to make sure i'm not getting the errors. |
This is causing an error in version 8.0.5+ of react-styleguidist now when using this plugin.
The text was updated successfully, but these errors were encountered: