我用react-init创建的我的RN项目工作正常,直到我做 npm install 才能让 react-native-elements 与 react-native-vector-icons 一起工作 . 我无法链接,它说我有反应本地而不是react-native-cli . 所以我卸载并反应原生并全局安装cli .
现在 npm start 告诉我,我有"The Expo SDK requires Expo to run" .
在ExpoKit instructions中它说:打开项目时,Android Studio可能会提示您升级Gradle或其他构建工具的版本,但不要这样做,因为您可能会得到意想不到的结果 . ExpoKit始终附带所有构建工具的最新支持版本 .
显然我没有听从那个建议,这是我的惩罚 . 但我该怎么办呢 . 我的项目非常复杂 .
这是有问题的 projects.json 和它的前版本 . 有什么办法可以回滚到我的工作安装吗?
{
"name": "noam",
"version": "0.0.1",
"private": true,
"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": "jest"
},
"dependencies": {
"eslint": "^4.19.1",
"expo": "^27.0.0",
"jsonloader": "^1.0.1",
"object-path": "^0.11.4",
"react": "16.3.1",
"react-native": "0.55.3",
"react-native-action-bar": "^2.0.5",
"react-native-bluetooth-status": "^1.1.3",
"react-native-checkbox": "^2.0.0",
"react-native-cli": "^2.0.1",
"react-native-collapsible": "^0.11.2",
"react-native-drawer-layout": "^2.0.0",
"react-native-elements": "^0.19.1",
"react-native-exit-app": "^1.0.0",
"react-native-material-dropdown": "^0.11.1",
"react-native-scripts": "^1.14.1",
"react-native-simple-radio-button": "^2.7.1",
"react-native-tab-view": "0.0.77",
"react-native-vector-icons": "^4.6.0",
"react-navigation": "^1.5.11",
"rn-stack-router": "^1.0.0"
},
"devDependencies": {
"babel-eslint": "^8.2.3",
"babel-jest": "22.4.3",
"babel-preset-react-native": "4.0.0",
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-import": "^2.11.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.8.2",
"is-arrayish": "^0.3.1",
"jest": "22.4.3",
"react-test-renderer": "16.3.1"
},
"jest": {
"preset": "react-native"
},
"rnpm": {
"assets": ["./assets/fonts/"]
}
}
旧版本已插入第23行:
"react-native-cli": "^2.0.1",
"react-native-scripts": "^1.14.1",
"babel-eslint": "^8.2.3",
新闻:如果我做了 yarn install 然后 yarn start 在loooooong等待之后"creating package..."
那么为什么会这样呢? npm的版本问题?