Object.hasOwn(defaultMergeFunctions, key))

问题描述 投票:0回答:1

描述:我尝试在 Javascript 应用程序中使用 Appium 运行 Android Studio 模拟器,尝试在 appium 中运行模拟器时遇到下一个错误。

我已经为此项目安装了node v16.14.0(npm v8.3.1)

warning ../../../../package.json: No license field
$ ./node_modules/.bin/wdio ./config/wdio.android.app.conf.js
file:///Users/XXX/Documents/123/repositorios/app-ui-automation/node_modules/deepmerge-ts/dist/node/index.mjs:245
                .filter(([key, option]) => Object.hasOwn(defaultMergeFunctions, key))
                                                  ^

TypeError: Object.hasOwn is not a function
    at file:///Users/XXX/Documents/123/repositorios/app-ui-automation/node_modules/deepmerge-ts/dist/node/index.mjs:245:51
    at Array.filter (<anonymous>)
    at getUtils (file:///Users/XXX/Documents/123/repositorios/app-ui-automation/node_modules/deepmerge-ts/dist/node/index.mjs:245:18)
    at deepmergeCustom (file:///Users/XXX/Documents/123/repositorios/app-ui-automation/node_modules/deepmerge-ts/dist/node/index.mjs:223:19)
    at file:///Users/XXX/Documents/123/repositorios/app-ui-automation/node_modules/webdriver/build/utils.js:10:19
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Process finished with exit code 1

这些是我的 package.json 依赖项:

"dependencies": {
    "@babel/cli": "^7.22.10",
    "@babel/core": "^7.22.10",
    "@babel/node": "^7.22.10",
    "@babel/polyfill": "^7.12.1",
    "@babel/preset-env": "^7.22.10",
    "@babel/register": "^7.22.5",
    "@popperjs/core": "^2.10.0",
    "@types/cucumber": "^6.0.1",
    "@types/fibers": "^3.1.1",
    "@types/node": "^12.20.55",
    "@types/webdriverio": "^5.0.0",
    "@wdio/allure-reporter": "^8.14.0",
    "@wdio/cli": "^8.14.4",
    "@wdio/cucumber-framework": "^8.14.0",
    "@wdio/local-runner": "^8.14.3",
    "@wdio/spec-reporter": "^8.14.0",
    "@wdio/sync": "^7.27.0",
    "allure-commandline": "^2.13.0",
    "aws-sdk": "^2.1010.0",
    "axios": "^0.24.0",
    "bootstrap": "^5.1.0",
    "bufferutil": "^4.0.1",
    "bundled-dependencies": "^2.1.0",
    "card-validator": "^8.1.1",
    "chai": "^4.2.0",
    "creditcard-generator": "^0.0.7",
    "cucumber": "^6.0.4",
    "cucumber-html-reporter": "^5.5.0",
    "debug": "^4.1.1",
    "dotenv": "^10.0.0",
    "eslint": "^8.12.0",
    "eslint-config-airbnb": "^18.0.1",
    "eslint-config-airbnb-base": "^14.0.0",
    "eslint-config-prettier": "^6.5.0",
    "eslint-plugin-import": "^2.24.2",
    "eslint-plugin-jsx-a11y": "^6.4.1",
    "eslint-plugin-react": "^7.25.1",
    "eslint-plugin-react-hooks": "^4.2.0",
    "fibers": "^5.0.3",
    "fs": "^0.0.1-security",
    "husky": "^3.0.9",
    "ipfs-http-client": "^51.0.0",
    "native-fetch": "^3.0.0",
    "nconf": "^0.10.0",
    "node": "^16.14.0",
    "node-fetch": "^3.0.0",
    "node-fetch-npm": "^2.0.4",
    "npm": "^7.21.1",
    "package-json": "^2.3.1",
    "prettier": "^1.19.1",
    "react": "^17.0.2",
    "request": "^2.88.2",
    "swiper": "^6.8.4",
    "utf-8-validate": "^5.0.2",
    "webdriverio": "^7.11.1",
    "ws": "^7.4.6",
    "xmlhttprequest": "^1.8.0"
  },
  "devDependencies": {
    "npm-bundle": "^3.0.3"
  }

以前安装的版本比这些旧,所以我更新了这些依赖项(更新的如上所示)

操作系统:MacOs Ventura 13.5 苹果M1 Pro

有人可以帮我吗?

node.js appium android-virtual-device webdriver-io
1个回答
0
投票

刚刚面临同样的问题 - 通过更新节点修复

© www.soinside.com 2019 - 2024. All rights reserved.