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:\[email protected]\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:\[email protected]\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.
me too.
+1
same here.....
and here..
and me as well
+1 me too
me too
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@latestworked for me
I tried that and it didn't work.
Wouldn't it be a better fix to add a transpiling step before publishing so this does not need to happen in every instance if someone uses this library?
After I put "LineChart" as sample into render() function. I't make my app crash after 5-10 seconds ("LineChart" visible ok as example). I'm using expo 32.0.0 and [email protected]
try to use react-native-pure-chart
Tried all chart npms out there and none worked apart from react-native-pure-chart
+1
@charloh Victory charts works nicely and works on web+native.
npm install react-native-svg solved the issue for me