Skip to content
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

Update react-docgen version #189

Merged
merged 1 commit into from
Sep 30, 2016

Conversation

wadackel
Copy link
Contributor

Hi! Thank you for awesome styleguide.

I'm using the Intersection types of flowtype.
At that time the following errors occurred.

ERROR in ./~/react-styleguidist/loaders/props.loader.js!./src/js/components/ui/IconButton/IconButton.js
Module build failed: ReferenceError: file is not defined
    at Object.module.exports (/Applications/XAMPP/xamppfiles/htdocs/flamber/node_modules/react-styleguidist/loaders/props.loader.js:40:66)
 @ ./~/react-styleguidist/loaders/styleguide.loader.js! 4:14908-15018

ERROR in ./~/react-styleguidist/loaders/props.loader.js!./src/js/components/ui/StarButton/StarButton.js
Module build failed: ReferenceError: file is not defined
    at Object.module.exports (/Applications/XAMPP/xamppfiles/htdocs/flamber/node_modules/react-styleguidist/loaders/props.loader.js:40:66)
 @ ./~/react-styleguidist/loaders/styleguide.loader.js! 4:31565-31675
Child html-webpack-plugin for "index.html":
         Asset    Size  Chunks       Chunk Names
    index.html  573 kB       0
    chunk    {0} index.html 534 kB [rendered]
        [0] ./~/html-webpack-plugin/lib/loader.js!./styleguide/index.html 579 bytes {0} [built]
        [1] ./~/lodash/lodash.js 533 kB {0} [built]
        [2] (webpack)/buildin/module.js 251 bytes {0} [built]

Errors in the react-docgen is looks like this is the cause.
However, in the latest version of the react-docgen since corrected that you want to update.

By the way, now we have to avoid to specify as follows the latest version of the react-docgen.

// styleguide.config.js
module.exports = {
  // ...
  propsParser(filePath, source) {
    return require("react-docgen").parse(source);
  }
}

Ref: reactjs/react-docgen Fix intersection and union flow types #118

Ref: reactjs/react-docgen Fix intersection and union flow types styleguidist#118
@sapegin sapegin merged commit 28f85b8 into styleguidist:master Sep 30, 2016
@sapegin
Copy link
Member

sapegin commented Sep 30, 2016

Thanks! Unfortunately can’t make release now because I have some unfinished stuff in master (I know I shouldn’t do this $-) I’m going to release 4.0.0-beta next week. Sorry for inconvenience.

@wadackel
Copy link
Contributor Author

Thank you for quick reply & merge! Loocking forward to next week's release 😄
I'm rooting for development of styleguidist.

@hauptrolle
Copy link

hauptrolle commented Oct 12, 2016

Hi, I get a similar error, when I try to use an stateless component which is decorated with "react-css-modules". Error: No suitable component definition found.

import React, {PropTypes} from 'react';
import CSSModules from 'react-css-modules';

import styles from './label.css';

const propTypes = {
    content: PropTypes.string
};

const Label = ({content}) => <label styleName="label">
    {content}
</label>;

Label.propTypes = propTypes;
export default CSSModules(Label, styles);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants