react-docgen icon indicating copy to clipboard operation
react-docgen copied to clipboard

Multiple Export Definitions Error

Open shihlinlu opened this issue 6 years ago • 2 comments

I'm getting the following error when I run my buildDocs script:

.../resolver/findExportedComponentDefinition.js:107
throw new Error(ERROR_MULTIPLE_DEFINITIONS)

This error still occurs even after I add the resolver option:

--resolver  findAllExportedComponentDefinitions

I have seen a previous issue with the similar problem here: https://github.com/reactjs/react-docgen/issues/213

I have multiple exports for Redux connected components for ease of testing.

And as more background info, my application utilizes TypeScript, React, and Redux. I am using react-docgen v5.0.0-beta.1

shihlinlu avatar Oct 14 '19 20:10 shihlinlu

The error is only thrown in findExportedComponentDefinition, so if you change the resolver it should not throw.

That means either the resolver option does not work, or something else is wrong.

danez avatar Oct 25 '19 20:10 danez

@shihlinlu @danez changing the resolver, resolved this for me

hanford avatar Jan 04 '20 23:01 hanford