我正在嘗試通過使用博世開發環境創建應用程序來學習react-native。在安裝redux之前,我有一個工作應用程序(比expo附帶的代碼稍多)。目前,我從XDE收到以下錯誤:在博客應用程序中的React-native安裝問題
Problem checking node_modules dependencies: Unexpected end of JSON input
,並從iOS模擬器如下:
undefined is not an object (evaluating 'ReactPropTypes.string')
的package.json:
{
"name": "myApp",
"version": "0.0.0",
"description": "Hello Expo!",
"author": null,
"main": "main.js",
"scripts": {
"test": "node node_modules/jest/bin/jest.js"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@expo/ex-navigation": "~3.0.0",
"@expo/samples": "~1.0.3",
"babel-preset-react": "^6.24.1",
"expo": "17.0.0",
"react": "^16.0.0-alpha.12",
"react-native": "^0.45.1",
"react-redux": "^5.0.5",
"redux": "^3.6.0"
},
"devDependencies": {
"jest-expo": "~1.0.1"
}
}
我相信我的節點模塊包含有效的JSON。應該指出的是,我使用的是比當前版本更新的react-native版本。這是我安裝的軟件包的問題嗎?哪些文件有助於解決這個問題?
你的'package.json'看起來像什麼? – QoP
@QoP我把它添加到我的問題。 –
你有沒有做npm安裝? – Kun