我正在尝试通过使用博世开发环境创建应用程序来学习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