5.3.1 Warning: Cannot parse: Range Error: Maximum call stack size exceeded
I recently updated react-styleguidist which brought react-docgen to 5.3.1 and I started getting a lot of warnings:
Warning: Cannot parse src/components/Input/Input.jsx: RangeError: Maximum call stack size exceeded
It usually means that react-docgen does not understand your source code, try to file an issue here:
https://github.com/reactjs/react-docgen/issues
If I switch back to [email protected], all the warnings go away. I think it has something to do with using @component per the recommendation of react-styleguidist when using styled-components.
Can you please provide an example of a component, which shows this behavior?
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { InputMixin } from '../../mixins/components/InputMixin';
import { INPUT_SIZES } from '../../constants/INPUT';
import FormControl from '../../js/FormControl';
/**
* An HTML text input component.
*/
const Input = styled(FormControl)`
${InputMixin}
`;
Input.displayName = 'Input';
Input.propTypes = {
/**
* The size of the input.
*/
size: PropTypes.oneOf(Object.keys(INPUT_SIZES)),
/**
* The HTML input type.
* @ignore
*/
type: PropTypes.string,
/**
* The input should fill the entire width of the container.
*/
fluid: PropTypes.bool,
};
Input.defaultProps = {
size: INPUT_SIZES.md,
type: 'text',
fluid: true,
};
/** @component */
export default Input;
Same issue for me
I have the same issue, someone solves it?
I had the same issue today and we were using [email protected]. Verify if you don't use the incompatible version of this package.
duplicate of #590