首页 > 解决方案 > 如何检测项目中的哪个依赖项使用代理来激活 React Native Hermes

问题描述

我正在尝试在 react-native 项目中激活 Hermes,以改善启动时间和内存使用率,但是当我尝试运行它时,出现以下错误:

RefrenceError:属性“代理”不存在,js引擎:hermes

我知道 Hermes 还不支持代理使用,所以我试图确定我的哪些依赖项使用它以删除它。

我已经尝试在我的存储库中搜索Proxy关键字,但我无法确定对它的任何引用。如何检测哪些依赖项使用它?

我的依赖项如下:

"dependencies": {
  "@apollo/react-hooks": "^3.1.5",
  "@eva-design/eva": "^2.0.0",
  "@react-native-community/push-notification-ios": "^1.2.2",
  "@react-native-firebase/analytics": "^6.4.0",
  "@react-native-firebase/app": "^6.4.0",
  "@react-native-firebase/auth": "^6.4.0",
  "@react-native-firebase/dynamic-links": "^6.4.0",
  "@react-native-firebase/functions": "^6.4.0",
  "@react-native-firebase/messaging": "^6.4.0",
  "@react-native-firebase/storage": "^6.4.0",
  "@segment/analytics-react-native": "1.1.0",
  "@segment/analytics-react-native-amplitude": "1.1.0",
  "@sentry/react-native": "^1.4.5",
  "@ui-kitten/components": "^5.0.0",
  "@ui-kitten/eva-icons": "^5.0.0",
  "@welldone-software/why-did-you-render": "^4.2.6",
  "apollo-cache-inmemory": "^1.6.5",
  "apollo-cache-persist": "^0.1.1",
  "apollo-client": "^2.6.8",
  "apollo-link": "^1.2.14",
  "apollo-link-context": "^1.0.20",
  "apollo-link-error": "^1.1.13",
  "apollo-link-http": "^1.5.17",
  "apollo-link-retry": "^2.2.16",
  "apollo-link-ws": "^1.0.20",
  "apollo-utilities": "^1.3.3",
  "graphql": "^15.0.0",
  "graphql-tag": "^2.10.3",
  "lodash": "^4.17.15",
  "moment": "^2.24.0",
  "phone": "^2.4.3",
  "prop-types": "^15.7.2",
  "react": "16.9.0",
  "react-native": "0.61.4",
  "react-native-actionsheet": "^2.4.2",
  "react-native-check-notification-enable": "^1.3.0",
  "react-native-config-reader": "^4.1.0",
  "react-native-console-time-polyfill": "^1.2.1",
  "react-native-device-info": "^5.4.1",
  "react-native-fast-image": "^8.1.2",
  "react-native-gesture-handler": "^1.5.1",
  "react-native-gifted-chat": "^0.16.3",
  "react-native-haptic-feedback": "^1.9.0",
  "react-native-image-picker": "^2.3.1",
  "react-native-image-resizer": "^1.1.0",
  "react-native-image-view": "^2.1.8",
  "react-native-iphone-x-helper": "^1.2.1",
  "react-native-keycode": "^1.0.5",
  "react-native-modal": "^11.5.4",
  "react-native-permissions": "^2.0.8",
  "react-native-push-notification": "^3.1.9",
  "react-native-reanimated": "^1.4.0",
  "react-native-root-siblings": "^4.0.6",
  "react-native-safe-area-context": "^0.6.2",
  "react-native-screens": "^2.9.0",
  "react-native-svg": "^9.13.3",
  "react-navigation": "^4.0.10",
  "react-navigation-stack": "^1.10.3",
  "react-navigation-switch-transitioner": "^0.1.1",
  "react-navigation-tabs": "^2.6.0",
  "react-redux": "^7.1.3",
  "redux": "^4.0.4",
  "redux-persist": "^6.0.0",
  "redux-thunk": "^2.3.0",
  "reselect": "^4.0.0",
  "rn-fetch-blob": "^0.12.0",
  "subscriptions-transport-ws": "^0.9.16",
  "uuid": "^3.3.2"
},

标签: reactjsreact-nativereact-native-hermes

解决方案


@ui-kitten与 React Native Hermes 不完全兼容,应该将其从您的项目中删除。


推荐阅读