[英]create-react-app not working after installing yarn and npx working
[英]Create react native app and yarn not running after installing npm modules
我正在嘗試在使用create-react-native-app
制作的應用程序中實現react-navigation
。 問題是在安裝npm模塊(或任何其他模塊)后,沒有任何效果。 我收到諸如undefined is not an object (evaluating 'ReactPropTypes.string')
構建錯誤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"
}
}
紗v0.24.5
npm v3.10.10
Mac OSX Sierra 10.12.5
看起來像react和react-native之間的版本不匹配。 對我來說,安裝react-native @“ 0.45.1”與react @“ 16.0.0-alpha.12”可以解決此問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.