解决另一个问题我必须升级反应原生。我使用`react-native-git-upgrade 0.54.3`进行更新。是否有任何想法升级原生品种?
为了开始我的项目,我使用了create-react-native-app
我的package.json包含:
{
"name": "########",
"version": "0.1.0",
"private": true,
"devDependencies": {
"jest-expo": "23.0.0",
"react-native-scripts": "1.8.1",
"react-test-renderer": "16.0.0"
},
"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/vector-icons": "^6.3.1",
"exp": "^47.4.4",
"expo": "^23.0.4",
"react": "16.3.0-alpha.1",
"react-native": "0.54.3",
"react-native-swiper": "^1.5.13",
"react-navigation": "^1.5.8"
}
}
图像非常准确地描述了我的问题。
如果尝试执行守望者,cmd表示守望者未知
我更新了我的package.json:
{
"name": "ProdPrototype",
"version": "0.1.0",
"private": true,
"devDependencies": {
"jest-expo": "^25.1.0",
"react-native-scripts": "^1.11.1",
"react-test-renderer": "^16.2.0"
},
"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/vector-icons": "^6.3.1",
"connect": "^3.6.6",
"exp": "^50.0.5",
"expo": "^25.0.0",
"react": "16.0.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-24.0.0.tar.gz",
"react-native-swiper": "^1.5.13",
"react-navigation": "^1.5.8"
}
}
删除了node_modules并且运行npm install
没有用,同样的错误。
答案 0 :(得分:0)
"react-native": "https://github.com/expo/react-native/archive/sdk-24.0.0.tar.gz",
将此行放在package.json文件中的依赖项中