Duplicate declaration "React"
See original GitHub issueI’m using this plugin with next.js, which uses babel-plugin-react-require
. It seems that the changes in 3bab74c5587d33892fd2cb409df2ae3fad641b6e are conflicting with that.
So now I get this:
Module build failed: TypeError: unknown: Duplicate declaration "React"
5 | import _inherits from 'babel-runtime/helpers/inherits';
6 | import React from 'react';
> 7 | import React from 'react';
| ^
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:33
Top Results From Across the Web
reactjs - Duplicate declaration "Form" - React - Stack Overflow
Both have component class called Form so, gulp returns in console the following error messsage: Duplicate declaration "Form" while parsing file: ...
Read more >React-Redux import : duplicate declaration ? : r/reactjs - Reddit
Hi guys ! I'm a beginner in Redux and when trying to import a component I created, I have this error : Duplicate...
Read more >Module Build Failed: Duplicate Declaration "Editor"-Reactjs
Coding example for the question Module Build Failed: Duplicate Declaration "Editor"-Reactjs.
Read more >A brand new website interface for an even better experience!
Duplicate declaration "React"
Read more >Reactjs – Duplicate declaration “Form” – React - iTecNote
Reactjs – Duplicate declaration “Form” – React. react-nativereact-routerreactjs. I'm using React with two different components: Formsy and React Router Form ...
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 Free
Top 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
The
next/babel
preset includes https://unpkg.com/next@4.1.4/dist/server/build/babel/preset.js which usesbabel-plugin-react-require
- which has a bug, as documented above.This issue should be closed, and an issue filed on https://github.com/vslinko/babel-plugin-react-require instead.
I downgraded to v0.4.0 and this solved the problem. Not sure if the plugin is working well yet though