2018-07-04 14:53:41.838 [error][tid:com.facebook.react.JavaScript] undefined is not an object (evaluating '_victoryContainer.default')
2018-07-04 14:53:41.844 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: undefined is not an object (evaluating '_victoryContainer.default')
trying to run sample charts inside existing project this is what i cat as soon as i import it
as i dig in think its babel 7 thing
I had the same issue a few hours ago. Which react-native version do you use?
In my case, I got the error with react-native 0.56. After the downgrade to version 0.55.x my project worked again.
I was happy and didn't do any further researches, but I think that victory-native is not compatible with react-native 0.56
yes i am using 0.56 and they switched to babel 7 there so thats must be a problem
have the same issue on RN 0.56
me too, Same Issue~!

Any ETA on a fix for this?
I tried cloning this project and upgrading the dependencies. Seems like the way the startup script is setup is dependent upon starting the packager in a way that does not exist anymore.
Thank you all for identifying the cause of this issue. I updated the issue title to reflect the new information, but I won't be able to upgrade until next week. If anyone else would like to open a PR, I would greatly appreciate it.
I managed to clone the project, updated to react-native@^0.56.0, @babel/core@^7.0.0-beta.53, and babel-preset-react-native@^5.0.2 in devDependencies, and added metro-bundler@^0.22.1, and changed the start command to node node_modules/react-native/local-cli/cli.js start.
I'm able to get the demo project running, but am still seeing the undefined is not an object (evaluating '_victoryContainer.default').
@sdroadie then... it sounds like the bigger issue is the babel 7 upgrade. All of the main victory repos build lib/ and es/ targets with babel 6, and victory-native requires components form the main repos like:
import { VictoryContainer } from "victory-core/es";
I am in the middle of some major infrastructure work in the main repos. I will see if I can update our build infrastructure to use babel 7 while I'm at it. I expect all this work to land by Tuesday.
@boygirl, any update on this issue? thanks for your hard work.
Update:
After upgrading to Babel 7 in the main victory packages, I'm still hitting the same issue @sdroadie mentions in react-native@^0.56.0. I'm afraid this is going to take a few more days to solve. Thanks for your patience, everyone.
Update 2:
The issue is confined to the native version of the createContainer helper. Since I've narrowed it down, I think I can have this fixed by Monday.
me too, Same Issue.

but I changed this code

to import VictoryContainer from "../components/victory-container";
It's running normally.
Update:
I have done some refactoring to solve the underlying import issue that was causing issues with babel 7 + [email protected]. With Victory's move to much more modular packages in v30.0.0, it was a bit more complex than changing import VictoryContainer from "../components/victory-container";
Demos are all running as expected, but babel-preset-react-native@^5.0.0 has totally broken test infrastructure. https://github.com/FormidableLabs/victory-native/pull/347
I'm working on tracking that down, but I think this improvement will be further delayed by a day or two. In the meantime, if anyone has insight into the breaking changes in babel-preset-react-native@^5.0.0 please let me know
thanks @boygirl, i will try on it.
Update!
Using metro-react-native-babel-preset for compiling code for testing only. New version will be published within the hour as [email protected]. The reason for this major version bump is to conform to other victory packages. You can read about the rationale here: https://formidable.com/blog/2018/victory-is-turning-thirty/
This work is published as [email protected]
Thank you to everyone in this thread for their help and patience!
@boygirl Excelent
This work for me. Thank you so much.
Excellent. Worked for me
Most helpful comment
This work is published as
[email protected]Thank you to everyone in this thread for their help and patience!