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.

Duplicate babel-polyfill error

See original GitHub issue

I use babel-polyfill in my app and this seems to cause the following error:

only one instance of babel-polyfill is allowed

If I remove my require(babel-polyfill) then I can get react-simple-img working, but other parts of my app break and I haven’t figured out why. Is it possible to remove this dependency from react-simple-img?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bluebill1049commented, Apr 26, 2018

Thanks for the checking, i guess i have to do the following

if (!global._babelPolyfill && !window._babelPolyfill) { 
  require("babel-polyfill");
}

will let you know once published

1reaction
bluebill1049commented, Apr 25, 2018

Hey Dustin,

i will update it to be Peer Dependencies, this should fix your issue.

cheers bill

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manage multiple babel-polyfill imports instead of throwing an ...
When loading the polyfill, check if global._babelPolyfill is set. If it exists and it has a different major version than the current one,...
Read more >
babel/polyfill (Babel 7 beta) causes a SyntaxError [duplicate]
Try changing the entry point entry key to : entry: ['babel-polyfill', './src/index.js'] . According to the docs the polyfill must be at the ......
Read more >
babel/plugin-transform-runtime
A plugin that enables the re-use of Babel's injected helper code to save on codesize.
Read more >
Options - Babel.js
The same EntryTarget may be used multiple times unless each one is given a different name, and doing so will result in a...
Read more >
babel/register - Babel.js
Polyfill not included. You must include the polyfill separately when using features that require it, like generators. Ignores node_modules by default.
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