react-native-chart-kit: react-native-chart-kit breaks a fresh expo app

Hey, if I install this library, expo crashes. As soon as I remove it, it works again.

Here is the error:


[13:05:34] \node_modules\babel-plugin-module-resolver\lib\index.js:88
[13:05:34]       })[1];
[13:05:34]         ^
[13:05:34]
[13:05:34] TypeError: Cannot read property '1' of undefined
[13:05:34]     at Plugin.manipulateOptions (\node_modules\babel-plugin-module-resolver\lib\index.js:88:9)
[13:05:34]     at normalizeOptions (\node_modules\@babel\core\lib\transformation\normalize-opts.js:59:16)
[13:05:34]     at runSync (\node_modules\@babel\core\lib\transformation\index.js:44:86)
[13:05:34]     at transformSync (\node_modules\@babel\core\lib\transform.js:43:38)
[13:05:34]     at Object.transform (\node_modules\@babel\core\lib\transform.js:22:38)
[13:05:34]     at compile (\node_modules\@babel\register\lib\node.js:73:20)
[13:05:34]     at compileHook (\node_modules\@babel\register\lib\node.js:102:12)
[13:05:34]     at Module._compile (\node_modules\pirates\lib\index.js:77:29)
[13:05:34]     at Module._extensions..js (internal/modules/cjs/loader.js:689:10)
[13:05:34]     at Object.newLoader [as .js] (\node_modules\pirates\lib\index.js:88:7)
[13:05:34] Metro Bundler process exited with code 1
[13:05:34] Error: Metro Bundler process exited with code 1
    at ChildProcess.<anonymous> (C:\xdl@51.6.0\src\Project.js:1496:14)
    at Generator.next (<anonymous>)
    at step (User\AppData\Local\Yarn\Data\global\node_modules\xdl\build\Project.js:2099:191)
    at User\AppData\Local\Yarn\Data\global\node_modules\xdl\build\Project.js:2099:437
    at new Promise (User\AppData\Local\Yarn\Data\global\node_modules\core-js\modules\es6.promise.js:177:7)
    at ChildProcess.<anonymous> (User\AppData\Local\Yarn\Data\global\node_modules\xdl\build\Project.js:2099:99)
    at ChildProcess.packagerProcess.once (C:\xdl@51.6.0\src\Project.js:1494:5)
    at Object.onceWrapper (events.js:275:13)
    at ChildProcess.emit (events.js:182:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:225:12)

I noticed that the installed library is not transpiled.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 11
  • Comments: 16 (1 by maintainers)

Commits related to this issue

Most upvoted comments

found an answer here:

eggie3 Nov '18 It seems like upgrading babel-plugin-module-resolver to version 3.1.1 solved that problem.

yarn add babel-plugin-module-resolver@latest worked for me

@charloh Victory charts works nicely and works on web+native.

try to use react-native-pure-chart