question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: /root/my-project/src/utils/Yuan.js: Duplicate declaration "React"

See original GitHub issue

Hi there, has anybody else get this error when running npm run build?

I started getting error like these using v1, then I thought using v2 should solve it but it didn’t.

Here is an screenshot, I’m getting the same error either in Ubuntu or MacOS, running Node 8.11 and 9.10

screen shot 2018-10-01 at 7 17 47 pm

Thanks in advance.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
Leocardoso94commented, Oct 2, 2018

Same error here

3reactions
Leocardoso94commented, Oct 2, 2018

Running the following command the error stopped for me:

rm yarn.lock && rm -rf node_modules && yarn && yarn build

Read more comments on GitHub >

github_iconTop Results From Across the Web

Duplicate declaration "React" · Issue #31 - GitHub
I'm using this plugin with next.js, which uses babel-plugin-react-require . It seems that the changes in 3bab74c are conflicting with that.
Read more >
Module build failed , Duplicate declaration - Stack Overflow
I am following Microsoft Tutorial regarding React JS, ... Duplicate declaration "InboxPane". the code is as follows: app.js var React ...
Read more >
Module Build Failed: Duplicate Declaration "Editor"-Reactjs
Coding example for the question Module Build Failed: Duplicate Declaration "Editor"-Reactjs.
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 >
Developers - Duplicate declaration "React" - - Bountysource
I'm using this plugin with next.js, which uses babel-plugin-react-require . It seems that the changes in 3bab74c5587d33892fd2cb409df2ae3fad641b6e are ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found