Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: only one instance of babel-polyfill is allowed #951

Closed
sompylasar opened this issue Jul 9, 2018 · 2 comments
Closed

Error: only one instance of babel-polyfill is allowed #951

sompylasar opened this issue Jul 9, 2018 · 2 comments

Comments

@sompylasar
Copy link

🐛 bug report

Description of the problem

Cannot use joymap from a CodeSandbox React app, which seems to also import babel-polyfill. The issue does not reproduce in CodeSandbox Vanilla (Parcel) template.

Recommended solution is to not import babel-polyfill in library code: https://babeljs.io/docs/en/babel-polyfill/#details so I filed an issue to joymap: diegodoumecq/joymap#6

But maybe there's also a solution from the CodeSandbox side which could make using such libraries possible.


screen shot 2018-07-08 at 5 07 43 pm

Error: only one instance of babel-polyfill is allowed
    at evaluate (https://3xlknpxpnq.codesandbox.io/node_modules/babel-polyfill/lib/index.js:10:9)
    at oe (https://codesandbox.io/static/js/sandbox.c7332c5c.js:1:266028)
    at e.value (https://codesandbox.io/static/js/sandbox.c7332c5c.js:1:277949)
    at e.value (https://codesandbox.io/static/js/sandbox.c7332c5c.js:1:249394)
    at d (https://codesandbox.io/static/js/sandbox.c7332c5c.js:1:277743)
    at evaluate (https://3xlknpxpnq.codesandbox.io/node_modules/joymap/bin/index.js:8:1)
    at oe (https://codesandbox.io/static/js/sandbox.c7332c5c.js:1:266028)
    at e.value (https://codesandbox.io/static/js/sandbox.c7332c5c.js:1:277949)
    at e.value (https://codesandbox.io/static/js/sandbox.c7332c5c.js:1:249394)
    at d (https://codesandbox.io/static/js/sandbox.c7332c5c.js:1:277743)
    at evaluate (https://3xlknpxpnq.codesandbox.io/src/index.js:11:15)
    at oe (https://codesandbox.io/static/js/sandbox.c7332c5c.js:1:266028)
    at e.value (https://codesandbox.io/static/js/sandbox.c7332c5c.js:1:277949)
    at e.value (https://codesandbox.io/static/js/sandbox.c7332c5c.js:1:249394)
    at e.value (https://codesandbox.io/static/js/sandbox.c7332c5c.js:1:249167)
    at https://codesandbox.io/static/js/sandbox.c7332c5c.js:1:67799
    at g (https://codesandbox.io/static/js/common-sandbox.3b0bd51a.chunk.js:1:156219)
    at Generator._invoke (https://codesandbox.io/static/js/common-sandbox.3b0bd51a.chunk.js:1:156007)
    at Generator.e.(anonymous function) [as next] (https://codesandbox.io/static/js/common-sandbox.3b0bd51a.chunk.js:1:156398)
    at n (https://codesandbox.io/static/js/common-sandbox.3b0bd51a.chunk.js:1:169318)
    at https://codesandbox.io/static/js/common-sandbox.3b0bd51a.chunk.js:1:169414

Code:

import React from "react";
import ReactDOM from "react-dom";

import { createJoyMap, createQueryModule } from "joymap";

const rootElement = document.getElementById("root");
ReactDOM.render(<div />, rootElement);

How has this issue affected you? What are you trying to accomplish?

Trying to use joymap package from npm as a dependency.

Link to sandbox: link (optional)

Your Environment

Software Name/Version
Сodesandbox PROD-1530978082-067f9fe
Browser Chrome 67 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
Operating System macOS 10.12 Sierra
@codesandbox-stale-bot
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@sompylasar
Copy link
Author

Closing. Looks like this was fixed somewhere, does not reproduce in the test sandbox https://codesandbox.io/s/3xlknpxpnq

Possibly related:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant