Search code examples
node.jsappiumandroid-virtual-devicewebdriver-io

Object.hasOwn(defaultMergeFunctions, key))


Description: I try to run Android Studio emulator with Appium in a Javascript application and I'm getting the next error trying to run emulator in appium.

I have installed node v16.14.0 (npm v8.3.1) for this project

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

These are my package.json dependencies:

"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"
  }

The previous versions installed were older than these, so I updated these dependencies (Updated ones are shown above)

OS: MacOs Ventura 13.5 Apple M1 Pro

Can anybody help me with this?


Solution

  • Just faced with the same issue - fixed by updating node