import/export - Multiple exports triggered when duplication isn't relevant
See original GitHub issueI get the error Multiple exports of name 'List'
from both lines of components/pages/index.js
in following example:
// components/pages/index.js
export * as Messages from "./messages";
export * as Users from "./users";
// components/pages/messages/index.js
export List from "./list";
export Show from "./show";
// components/pages/users/index.js
export Edit from "./edit";
export List from "./list";
// components/pages/messages/list.js => React Component
// components/pages/messages/show.js => React Component
// components/pages/users/edit.js => React Component
// components/pages/users/list.js => React Component
I understand that if I get it once, I’ll get it twice, but I don’t think it should be happening at all. The code itself works when I access my components (Pages.Users.List
) leading me to believe this is a bug in the rule. I also made sure to update to the latest version (2.20.1) before submitting this
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:18 (11 by maintainers)
Top Results From Across the Web
Multiple exports triggered when duplication isn't relevant ...
I get the error Multiple exports of name 'List' from both lines of components/pages/index.js in following example: ...
Read more >Django import-export duplicating rows when importing same ...
I upload a csv file with a header row and a data row. I confirm the table has only one row. Then I...
Read more >Common Issues with the SQL Server Import and Export Wizard
The SQL Server Import and Export Wizard is a useful tool for copying data from one data source (e.g. a SQL Server database...
Read more >Topic: Import of site creates menus with duplicate menu items
In creating an import and then exporting to a brand new mirror site, I have found that all of the menus created on...
Read more >Solutions to common product CSV import problems
Troubleshooting product CSV files. Identify missing fields or headers, illegal formatting or identifier duplications before contacting support.
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 started to attempt a fix today and ran into an issue with the current
ecmaVersion
being too old for the syntax. But after I updated that, I found out the issue has already been fixed! Potentially here. Below is a test specifically for it that I can add, but I don’t know if there are any further repercussions for updating theecmaVersion
Long story short, this is fixed on version 2.22.0. Thanks @ljharb!
Also ran into this issue with the following code:
Both the following imported files contain an
EventType
export, and should be referenced asWorkerPhoneCreated.EventType
andWorkerPhoneUpdated.EventType
respectively and so I think this “multiple exports” error is a false positive if I’ve understood correctly.