undefined 不是对象(正在计算 'ReactInternals.ReactCurrentOwner')
undefined is not an object (evaluating 'ReactInternals.ReactCurrentOwner')
我正在编写一个应用程序,一切正常,直到我不得不安装和使用 react-native-router-flux。
它的版本似乎有问题,但我找不到它。
这是我得到的错误(来自我导入 react-native-router-flux 的行):
undefined is not an object (evaluating 'ReactInternals.ReactCurrentOwner')
我已经搜索过了,但 none 的建议有效!
如果有人能帮助我,我将不胜感激。
package.json:
{
"name": "Manager",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"babel-preset-react-native": "^2.1.0",
"firebase": "^5.0.3",
"react": "^16.0.0-alpha.3",
"react-addons-pure-render-mixin": "^15.5.0",
"react-native": "^0.55.4",
"react-native-router-flux": "^3.43.0",
"react-redux": "^5.0.7",
"react-static-container": "^1.0.1",
"redux": "^4.0.0",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"babel-jest": "23.4.2",
"jest": "23.4.2",
"react-test-renderer": "^16.0.0-alpha.12"
},
"jest": {
"preset": "react-native"
}
}
P.S:当我尝试更新我的 react-native-router-flux 时,我从 npm 得到这个错误:
npm ERR! code ENOGIT
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.
您可以尝试 npm i react@16.0.0-alpha.12 --save
或 yarn add react@16.0.0-alpha.12
。跟踪 github 问题 here
我正在编写一个应用程序,一切正常,直到我不得不安装和使用 react-native-router-flux。 它的版本似乎有问题,但我找不到它。 这是我得到的错误(来自我导入 react-native-router-flux 的行):
undefined is not an object (evaluating 'ReactInternals.ReactCurrentOwner')
我已经搜索过了,但 none 的建议有效! 如果有人能帮助我,我将不胜感激。
package.json:
{
"name": "Manager",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"babel-preset-react-native": "^2.1.0",
"firebase": "^5.0.3",
"react": "^16.0.0-alpha.3",
"react-addons-pure-render-mixin": "^15.5.0",
"react-native": "^0.55.4",
"react-native-router-flux": "^3.43.0",
"react-redux": "^5.0.7",
"react-static-container": "^1.0.1",
"redux": "^4.0.0",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"babel-jest": "23.4.2",
"jest": "23.4.2",
"react-test-renderer": "^16.0.0-alpha.12"
},
"jest": {
"preset": "react-native"
}
}
P.S:当我尝试更新我的 react-native-router-flux 时,我从 npm 得到这个错误:
npm ERR! code ENOGIT
npm ERR! No git binary found in $PATH
npm ERR!
npm ERR! Failed using git.
npm ERR! Please check if you have git installed and in your PATH.
您可以尝试 npm i react@16.0.0-alpha.12 --save
或 yarn add react@16.0.0-alpha.12
。跟踪 github 问题 here