React native 本地对等依赖
自从expo sdk 28升级后,我遇到了问题 警告:缺少“反应本机”对等依赖项。在/Users/macbook/Desktop/eventlinn中运行React native 本地对等依赖,react-native,expo,package.json,React Native,Expo,Package.json,自从expo sdk 28升级后,我遇到了问题 警告:缺少“反应本机”对等依赖项。在/Users/macbook/Desktop/eventlinn中运行npm ls。 警告:缺少“反应”对等依赖项。在/Users/macbook/Desktop/eventlinn中运行npm ls 我的package.json是这样的 "dependencies": { "@expo/samples": "2.1.1", "axios": "^0.18.0", "expo": "^28
npm ls
。
警告:缺少“反应”对等依赖项。在/Users/macbook/Desktop/eventlinn中运行npm ls
我的package.json是这样的
"dependencies": {
"@expo/samples": "2.1.1",
"axios": "^0.18.0",
"expo": "^28.0.0",
"impagination": "^1.0.0-alpha.3",
"moment": "^2.22.2",
"native-base": "^2.7.1",
"pod": "^0.9.0",
"react": "^16.3.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-28.0.0.tar.gz",
"react-native-camera": "^1.1.4",
"react-native-datepicker": "^1.7.2",
"react-native-dismissable-numeric-keyboard": "^0.1.0",
"react-native-elements": "^0.19.1",
"react-native-fcm": "^6.2.3",
"react-native-firebase": "^4.2.0",
"react-native-flexi-radio-button": "^0.2.2",
"react-native-google-places": "^2.5.2",
"react-native-keyboard-aware-scroll-view": "^0.6.0",
"react-native-modal-datetime-picker": "^5.1.0",
"react-native-modal-dropdown": "^0.6.2",
"react-native-modal-picker": "0.0.16",
"react-native-modal-selector": "0.0.27",
"react-native-select-input-ios": "^1.2.0",
"react-navigation": "~2.3.1",
"react-timer-mixin": "^0.13.3",
"util": "^0.10.3",
"watchman": "^1.0.0",
"yarn": "^1.7.0"
}
首先从下面的依赖项更新您的依赖项版本,然后从您的依赖项中添加其他所需的依赖项:
{
"name": "nativebasedemo",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest",
"clean": "rm -rf $TMPDIR/react-* && watchman watch-del-all && npm cache clean --force",
"newclear": "rm -rf $TMPDIR/react-* && watchman watch-del-all && rm -rf ios/build && rm -rf node_modules/ && npm cache clean --force && npm i",
"test:watch": "jest --watch",
"lint": "eslint ./App",
"lintdiff": "git diff --name-only --cached --relative | grep '\\.js$' | xargs standard | snazzy",
"fixcode": "eslint --fix ./App",
"git-hook": "npm run lint -s && npm run test -s",
"rm-node": "rm -rf node_modules && npm install"
},
"dependencies": {
"lodash": "^4.17.10",
"native-base": "^2.4.4",
"prop-types": "^15.6.1",
"react": "16.3.2",
"react-native": "^0.55",
"react-native-easy-grid": "^0.2.0",
"react-navigation": "2.2.5"
},
"devDependencies": {
"babel-core": "6.26.0",
"babel-eslint": "^8.2.5",
"babel-jest": "22.4.3",
"babel-plugin-ignite-ignore-reactotron": "^0.3.0",
"babel-preset-env": "^1.6.1",
"babel-preset-react-native": "^3.0.2",
"eslint": "^4.19.1",
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-import": "^2.10.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.7.0",
"jest": "22.4.3"
},
"jest": {
"testMatch": [
"<rootDir>/Tests/**/*.js",
"**/?(*.)(spec|test).js?(x)"
],
"testPathIgnorePatterns": [
"/node_modules/",
"<rootDir>/Tests/Setup.js"
],
"moduleNameMapper": {
"^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "identity-obj-proxy"
},
"setupFiles": [
"<rootDir>/Tests/Setup"
],
"preset": "react-native"
}
}
{
“名称”:“nativebasedemo”,
“版本”:“0.0.1”,
“私人”:没错,
“脚本”:{
“开始”:“node node_modules/react native/local cli/cli.js start”,
“测试”:“玩笑”,
“清理”:“rm-rf$TMPDIR/react-*&&watchman watch del all&&npm缓存清理--force”,
“newclear”:“rm-rf$TMPDIR/react-*&&watchman watch del all&&rm-rf ios/build&&rm-rf node_modules/&&npm cache clean--force&&npm i”,
“测试:观察”:“开玩笑——观察”,
“lint”:“eslint./App”,
“lintdiff”:“git diff--仅限名称--缓存--相对的| grep'\\\.js$”| xargs standard | snazzy”,
“fixcode”:“eslint--fix./App”,
“git hook”:“npm run lint-s&&npm run test-s”,
“rm节点”:“rm-rf节点\模块和npm安装”
},
“依赖项”:{
“lodash”:“^4.17.10”,
“本机基础”:“^2.4.4”,
“道具类型”:“^15.6.1”,
“反应”:“16.3.2”,
“反应本机”:“^0.55”,
“react native easy grid”:“^0.2.0”,
“反应导航”:“2.2.5”
},
“依赖性”:{
“巴别塔核心”:“6.26.0”,
“babel eslint”:“^8.2.5”,
“巴别塔笑话”:“22.4.3”,
“巴别塔插件点火忽略反应器”:“^0.3.0”,
“巴别塔预设环境”:“^1.6.1”,
“巴别塔预设反应本机”:“^3.0.2”,
“eslint”:“^4.19.1”,
“eslint配置airbnb”:“^16.1.0”,
“eslint插件导入”:“^2.10.0”,
“eslint-plugin-jsx-a11y”:“^6.0.3”,
“eslint插件反应”:“^7.7.0”,
“笑话”:“22.4.3”
},
“笑话”:{
“测试匹配”:[
“/Tests/***/.js”,
“***/?(*)(规范测试).js?(x)”
],
“testPathIgnorePatterns”:[
“/node_modules/”,
“/Tests/Setup.js”
],
“moduleNameMapper”:{
“^.+\(jpg | jpeg | png | gif | eot | otf | webp | svg | ttf | woff | woff2 | mp4 | webm | wav | mp3 | m4a | aac | oga)$”:“身份obj代理”
},
“设置文件”:[
“/Tests/Setup”
],
“预设”:“本机反应”
}
}
我有一个类似的问题,即react
和react native
。
最终锁定了本机基础
版本到2.6.1
这样,native base
就不需要更高版本,而sdk-28.0.0.tar.gz
没有更高版本