Error: Multiple exported component definitions found.
See original GitHub issueNot sure how to approach this one…
WARNING in ./~/carte-blanche/dist/src/loaders/plugins-loader.js?dest="components"&commonsChunkFilename="undefined"!./src/scripts/components/lib/BrowseHero.jsx
Module build failed: Error: Multiple exported component definitions found.
at Context.exportDeclaration (/Users/cool-computer/Projects/redacted/node_modules/react-docgen/dist/resolver/findExportedComponentDefinition.js:100:13)
at Context.invokeVisitorMethod (/Users/cool-computer/Projects/redacted/node_modules/react-docgen/node_modules/ast-types/lib/path-visitor.js:342:43)
at Visitor.PVp.visitWithoutReset (/Users/cool-computer/Projects/redacted/node_modules/react-docgen/node_modules/ast-types/lib/path-visitor.js:194:28)
at NodePath.each (/Users/cool-computer/Projects/redacted/node_modules/react-docgen/node_modules/ast-types/lib/path.js:99:22)
at visitChildren (/Users/cool-computer/Projects/redacted/node_modules/react-docgen/node_modules/ast-types/lib/path-visitor.js:217:14)
at Visitor.PVp.visitWithoutReset (/Users/cool-computer/Projects/redacted/node_modules/react-docgen/node_modules/ast-types/lib/path-visitor.js:202:16)
at visitChildren (/Users/cool-computer/Projects/redacted/node_modules/react-docgen/node_modules/ast-types/lib/path-visitor.js:244:21)
at Visitor.PVp.visitWithoutReset (/Users/cool-computer/Projects/redacted/node_modules/react-docgen/node_modules/ast-types/lib/path-visitor.js:202:16)
at Visitor.PVp.visit (/Users/cool-computer/Projects/redacted/node_modules/react-docgen/node_modules/ast-types/lib/path-visitor.js:131:25)
at Object.visit (/Users/cool-computer/Projects/redacted/node_modules/react-docgen/node_modules/ast-types/lib/path-visitor.js:99:51)
@ ./src/scripts/components/lib !./~/carte-blanche/dist/src/loaders/plugins-loader.js?dest="components"&commonsChunkFilename="undefined"!.*\.jsx$
components declared in webpack config:
new CarteBlanche({
componentRoot: './src/scripts/components/lib/',
})
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
React js : how to resolve multiple export? - Stack Overflow
Show activity on this post. Hello i need to have a multiple export in react js but i have this error Line 84:3:...
Read more >Export multiple components from a file in React.js | bobbyhadz
Use named exports to export multiple components in React, e.g. export function A() {} and export function B() {} . The exported components...
Read more >Documentation - Modules - TypeScript
Conversely, to consume a variable, function, class, interface, etc. exported from a different module, it has to be imported using one of the...
Read more >Exporting table data | BigQuery - Google Cloud
For example, if your BigQuery dataset is in the EU multi-region, the Cloud Storage bucket can be located in the europe-west1 Belgium region,...
Read more >Logix 5000 Controllers Import/Export Project Components
Because of the many variables and requirements associated with any particular installation, Rockwell Automation, Inc. cannot assume responsibility or liability ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I experienced the same error, with simpler components following this design:
The solution was to export only once per file.
@cef62 thanks, so basically use
require('react-docgen').resolver.findAllComponentDefinitions
instead of just the resolver @nikgraf.