Error Package subpath './build/commands/element' is not defined by "exports" in WebdriverIO

20 Views Asked by At

nodeVersion : V8

And below is the Package.json file

{
  "name": "new-folder",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "type": "commonjs",
  "scripts": {
    "verification": "npx wdio wdio.confsauce.js --cucumberOpts.tagExpression=@Verfication",
    "smoke": "npx wdio wdio.confsauce.js --cucumberOpts.tagExpression=@Verification-01",
    "regression": "npx wdio wdio.confsauce.js --cucumberOpts.tagExpression=@MASTV-08",
    "test": "npx wdio wdio.conf.js --cucumberOpts.tagExpression=@MASTV-08",
    "wdio": "wdio run wdio.conf.js"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@babel/core": "^7.22.10",
    "@babel/preset-env": "^7.22.10",
    "@babel/register": "^7.22.5",
    "@wdio/cli": "^8.15.5",
    "@wdio/cucumber-framework": "^8.15.4",
    "@wdio/local-runner": "^8.15.4",
    "@wdio/sauce-service": "^8.15.4",
    "@wdio/spec-reporter": "^8.15.0",
    "chai": "^4.3.7",
    "chromedriver": "^122.0.3",
    "frisby": "^2.1.3",
    "multiple-cucumber-html-reporter": "^3.4.0",
    "wdio-chromedriver-service": "^8.1.1",
    "wdio-cucumberjs-json-reporter": "^5.1.6",
    "wdio-wait-for": "^3.0.6"
  },
  "dependencies": {
    "@wdio/globals": "^8.32.3",
    "node-fetch": "^2.6.7",
    "webdriverio": "^8.32.3"
  }
}

On running the script in chrome browser getting below error:

DevTools listening on ws://127.0.0.1:52665/devtools/browser/3a463e04-8473-4902-83a9-5cfc9614affa [0-8] Error: Package subpath './build/commands/element' is not defined by "exports" in D:\Users\sgundre\New StaffTool QA Automation1\amcas-verifications-qa-ui\node_modules\webdriverio\package.json

I didn't made any changes in package.json and suddenly getting this error.

0

There are 0 best solutions below