安装 npm 模块后创建 react native app 和 yarn not 运行
Create react native app and yarn not running after installing npm modules
我正在尝试将 react-navigation
实现到使用 create-react-native-app
制作的应用程序中。问题是在安装 npm 模块(或任何其他模块)之后没有任何效果。我收到类似 undefined is not an object (evaluating 'ReactPropTypes.string')
的构建错误。
用 Google 搜索并关注 github 上的问题,但仍未找到解决方案。有人能帮帮我吗?
package.json
{
"name": "TestApp",
"version": "0.1.0",
"private": true,
"devDependencies": {
"jest-expo": "~1.0.1",
"react-native-scripts": "0.0.31",
"react-test-renderer": "16.0.0-alpha.6"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "node node_modules/jest/bin/jest.js --watch"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"expo": "^17.0.0",
"react": "^16.0.0-alpha.6",
"react-native": "^0.45.0",
"react-navigation": "^1.0.0-beta.11"
}
}
yarn v0.24.5
npm v3.10.10
Mac OSX 塞拉利昂 10.12.5
看起来像是 react 和 react-native 之间的版本不匹配。安装 react-native@"0.45.1" 和 react@"16.0.0-alpha.12" 为我解决了这个问题。
我正在尝试将 react-navigation
实现到使用 create-react-native-app
制作的应用程序中。问题是在安装 npm 模块(或任何其他模块)之后没有任何效果。我收到类似 undefined is not an object (evaluating 'ReactPropTypes.string')
的构建错误。
用 Google 搜索并关注 github 上的问题,但仍未找到解决方案。有人能帮帮我吗?
package.json
{
"name": "TestApp",
"version": "0.1.0",
"private": true,
"devDependencies": {
"jest-expo": "~1.0.1",
"react-native-scripts": "0.0.31",
"react-test-renderer": "16.0.0-alpha.6"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "node node_modules/jest/bin/jest.js --watch"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"expo": "^17.0.0",
"react": "^16.0.0-alpha.6",
"react-native": "^0.45.0",
"react-navigation": "^1.0.0-beta.11"
}
}
yarn v0.24.5
npm v3.10.10
Mac OSX 塞拉利昂 10.12.5
看起来像是 react 和 react-native 之间的版本不匹配。安装 react-native@"0.45.1" 和 react@"16.0.0-alpha.12" 为我解决了这个问题。