首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >玩笑在反应本土化方面失败了?

玩笑在反应本土化方面失败了?
EN

Stack Overflow用户
提问于 2021-11-02 12:16:06
回答 1查看 230关注 0票数 1

我的玩笑脚本在反应-本机-调制解调器上失败了。为什么玩笑在这一点上失败了

误差

代码语言:javascript
复制
 ● Test suite failed to run

    TypeError: Cannot read property 'minor' of undefined

      at Object.<anonymous> (node_modules/react-native-modalize/lib/utils/devices.js:20:76)
      at Object.<anonymous> (node_modules/react-native-modalize/lib/utils/use-dimensions.js:25:19)

我的package.json在下面,

pacakge.json

代码语言:javascript
复制
{
  "name": "vendor",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "npx react-native run-android",
    "ios": "react-native run-ios"
  },
  "dependencies": {
    "@jest/globals": "^27.0.6",
    "@react-native-async-storage/async-storage": "^1.15.6",
    "react-native-modal": "^12.1.0",
    "react-native-modalize": "^2.0.8",
  },
  "devDependencies": {
    "@babel/core": "^7.15.0",
    "@babel/runtime": "^7.15.3",
    "@codler/react-native-keyboard-aware-scroll-view": "1.0.1",
    "@react-native-community/eslint-config": "^3.0.0",
    "@testing-library/jest-native": "^4.0.2",
    "@testing-library/react-native": "^7.2.0",
    "@typescript-eslint/eslint-plugin": "^4.29.2",
    "@typescript-eslint/parser": "^4.29.2",
    "babel-eslint": "^10.1.0",
    "babel-jest": "^27.0.6",
    "detox": "^17.14.9",
    "enzyme": "^3.11.0",
    "enzyme-adapter-react-16": "^1.15.6",
    "jest": "^26.6.3",
    "jest-circus": "^26.6.0",
    "jsdom": "17.0.0",
    "jsdom-global": "3.0.2",
    "metro-react-native-babel-preset": "^0.66.2",
    "prettier": "^2.3.2",
    "react-native-rename": "^2.9.0",
    "react-test-renderer": "17.0.2"
  },
  "jest": {
    "coverageReporters": [
      "text"
    ],
    "reporters": [
      "default",
      "jest-junit"
    ],
    "preset": "react-native",
    "setupFilesAfterEnv": [
      "@testing-library/jest-native/extend-expect"
    ],
    "transformIgnorePatterns": [
      "/node_modules/(?!react-native)/.+"
    ],
    "setupFiles": [
      "./node_modules/react-native-gesture-handler/jestSetup.js"
    ]
  },
  "jest-junit": {
    "output": "output/coverage/junit/junit.xml",
    "usePathForSuiteName": "true"
  }
}

在升级之前,我升级了react原生版本。

为什么会失败?我应该降低任何包装的等级,还是我错过了任何东西?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-11-12 11:15:46

它已在合并中修复。所以,继续更新您的react-native-modalize版本

正如您在node_modules/react-native-modalize/lib/utils/devices.js中所看到的,它与reactNativeVersion有关。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69810273

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档