capitalone / react-native-pathjs-charts

Android and iOS charts based on react-native-svg and paths-js
Apache License 2.0
879 stars 260 forks source link

Unhandled Promise rejection due to babel-polyfill #195

Closed dgladkov closed 6 years ago

dgladkov commented 7 years ago

Package versions:

{
    "react": "16.0.0-alpha.12",
    "react-native": "0.48.3",
    "react-native-pathjs-charts": "0.0.31",
    "react-native-svg": "5.4.1"
}

Traceback:

console.error: "Unhandled promise rejection", {}

console.error
    YellowBox.js:67:10
<unknown>
    es6.promise.js:97:18
module.exports
    _perform.js:3:26
<unknown>
    es6.promise.js:91:15
<unknown>
    JSTimers.js:295:17
_callTimer
    JSTimers.js:148:6
_callImmediatesPass
    JSTimers.js:196:6
Object.callImmediates
    JSTimers.js:464:11
MessageQueue.__callImmediates
    MessageQueue.js:282:13

Removing import 'babel-polyfill' solves the problem.

Issue #62 and related PR #64 that introduced babel-polyfill. Can we try to reproduce #62 on the latest RN release to make sure we still need the polyfill?

elbuild commented 7 years ago

I'm seeing the same error on:

{ "react": "16.0.0-alpha.12", "react-native": "0.47.1", "react-native-pathjs-charts": "0.0.31", "react-native-svg": "^6.0.0-rc1" }

and it looks like removing import 'babel-polyfill' fixes the issue. I also think we should check if polyfill is still needed.

thiswhy commented 7 years ago

I have the same problem @elbuild ,had you sovle this problem?and how?thans!

marzolfb commented 6 years ago

Closing now that #211 has been merged into master

insidelabs commented 6 years ago

With this fix, we're seeing the return of:

undefined is not a function (evaluating '_iterator[typeof Symbol === 'function' ? Symbol.iterator: '@@iterator']()')

Specifically on android

marzolfb commented 6 years ago

Curious what imports you have in your app? When I removed babel-polyfill, I also updated the example app and replaced:

import 'babel-polyfill'

with

import 'core-js/es6/symbol'
import 'core-js/fn/symbol/iterator'