I suddenly started getting this error when trying to build. This was all working a few weeks ago with no changes that I know of. The issue seems to be related to react
To solve this problem:
Open package.json and edit the react version to:
"react": "16.0.0-alpha.3",
"react-native": "0.43.1",
Delete node_modules directory
And re-install npm with the command npm install
In Addition: If you get a app:compileDebugJava ERROR, run react-native upgrade
(Got the solution from this github page and it worked for me)