如何检查EXPO反应中的依赖项版本

时间:2019-03-07 10:39:25

标签: reactjs react-native webpack expo react-native-web

我正在使用expo,进行本机反应,并与本机web一起反应。我正在升级到expo @ 32,因此是react-native@57.1

我在电话上运行所有功能,但是在网络上却没有。经常显示依赖项错误:


ERROR in ./src/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Cannot find module '../Components/AccessibilityInfo/AccessibilityInfo' (While processing preset: "/Users/jeremie/piple/piple/node_modules/react-native/Libraries/react-native/react-native-implementation.js")
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.get AccessibilityInfo [as AccessibilityInfo] (/Users/jeremie/piple/piple/node_modules/react-native/Libraries/react-native/react-native-implementation.js:19:12)
    at /Users/jeremie/piple/piple/node_modules/lodash/_baseClone.js:163:23
    at arrayEach (/Users/jeremie/piple/piple/node_modules/lodash/_arrayEach.js:15:9)
    at baseClone (/Users/jeremie/piple/piple/node_modules/lodash/_baseClone.js:160:3)
    at cloneDeepWith (/Users/jeremie/piple/piple/node_modules/lodash/cloneDeepWith.js:37:10)
    at OptionManager.mergeOptions (/Users/jeremie/piple/piple/node_modules/babel-core/lib/transformation/file/options/option-manager.js:206:44)
 @ multi (webpack)-dev-server/client?http://localhost:8080 (webpack)/hot/dev-server.js ./src/index.js main[2]

我需要确保我所有的软件包版本都兼容。我查看了react native和expo的变更日志,并按需更新了所有内容。

我不知道如何进行更多检查以及如何调试错误。

这是我的package.json

  "name": "piple",
  "version": "0.7",
  "private": true,
  "devDependencies": {
    "babel-loader": "^7.1.2",
    "babel-plugin-expo-web": "^0.0.5",
    "babel-plugin-react-native-web": "^0.10.0",
    "babel-plugin-transform-decorators-legacy": "1.3.4",
    "babel-plugin-transform-imports": "1.4.1",
    "babel-plugin-transform-runtime": "6.23.0",
    "css-loader": "0.28.7",
    "docz": "^0.12.16",
    "eslint-plugin-react": "^7.10.0",
    "file-loader": "^1.1.7",
    "gh-pages": "^1.2.0",
    "jest-expo": "^32.0.0",
    "react-native-scripts": "^2.0.1",
    "react-styleguidist": "^8.0.6",
    "react-test-renderer": "16.6.3",
    "style-loader": "^0.19.0",
    "sw-precache-webpack-plugin": "^0.11.5",
    "webpack-cli": "^3.1.2",
    "webpack-manifest-plugin": "^2.0.4"
  },
  "main": "./node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "eject": "expo eject",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "test": "NODE_ENV=test node_modules/.bin/jest",
    "test:ci": "jest --ci",
    "clean": "rm -rf node_modules && yarn cache clean && npm cache clean --force",
    "make": "yarn",
    "deploy:full": "./deploy",
    "deploy:fast": "yarn build:prod && expo publish && git add -A && git commit -m 'new version of PiPle keep looking on our develop branch' && git push && git checkout master && git merge --no-edit devellop && git push && git checkout devellop",
    "docu:dev": "docz dev",
    "docu:build": "docz build",
    "web": "webpack-dev-server -d --config ./webpack.config.js  --env dev --inline --hot --colors --content-base app/ --history-api-fallback",
    "build:dev": "NODE_ENV=production webpack --env dev --config ./webpack.config.js",
    "build:prod": "NODE_ENV=production webpack --env prod --config ./webpack.config.js"
  },
  "jest": {
    "transformIgnorePatterns": [
      "node_module/(?!(jest-)?react-native|react-navigation)"
    ],
    "moduleDirectories": [
      "node_modules"
    ],
    "preset": [
      "jest-expo"
    ]
  },
  "dependencies": {
    "@sentry/browser": "^4.4.1",
    "@sentry/cli": "^1.31.0",
    "audit": "0.0.6",
    "babel-plugin-transform-remove-console": "^6.9.4",
    "es6-symbol": "^3.1.1",
    "expo": "^32.0.0",
    "expo-analytics": "^1.0.7",
    "expo-firebase-crashlytics": "^1.0.0",
    "expo-web": "^0.0.14",
    "firebase": "^5.0.3",
    "get-urls": "^8.0.0",
    "javascript-time-ago": "^1.0.34",
    "jsc-android": "^224109.1.0",
    "lodash": "^4.15.0",
    "mobx": "^4",
    "mobx-react": "5.1.0",
    "npm": "^6.5.0",
    "open-graph-scraper": "^3.6.0",
    "password-validator": "^4.1.1",
    "prop-types": "^15.6.2",
    "query-string": "^6.2.0",
    "react": "^16.6.3",
    "react-art": "^16.5.1",
    "react-css-blur": "^1.1.1",
    "react-dom": "^16.5.1",
    "react-markdown": "^4.0.3",
    "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
    "react-native-blur": "^3.2.2",
    "react-native-camera-roll-picker": "^1.2.3",
    "react-native-dialog": "^5.4.0",
    "react-native-simple-markdown": "^1.1.0",
    "react-native-web": "^0.10.0",
    "react-native-web-svg": "^1.0.0",
    "react-navigation": "^3.0.9",
    "sentry-expo": "^1.11.0",
    "simple-markdown": "git://github.com/CharlesMangwa/simple-markdown.git",
    "sweetalert": "^2.1.2",
    "uglifyjs-webpack-plugin": "^1",
    "webpack": "^4.0.0",
    "webpack-dev-server": "^3.1.10",
    "ws": "^6.0.0"
  }
}

0 个答案:

没有答案