Failed launching test session: Error: Couldn't initialise "@wdio/cucumber-framework"
Failed launching test session: Error: Couldn't initialise "@wdio/cucumber-framework"
我正在使用命令“npm init wdio”设置 wdio 并尝试 运行 测试文件。它给出以下错误
Failed launching test session: Error: Couldn't initialise "@wdio/cucumber-framework". [0-0] Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/formatter/helpers/event_data_collector' is not defined by
下面是我的package.json文件
"name": "wdio-new",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"wdio": "wdio run wdio.conf.js"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@wdio/cli": "^7.16.12",
"@wdio/cucumber-framework": "^7.16.12",
"@wdio/local-runner": "^7.16.12",
"@wdio/spec-reporter": "^7.16.11",
"chromedriver": "^96.0.0",
"wdio-chromedriver-service": "^7.2.2"
}
}
我设法通过重新安装节点并在安装过程中选中“自动安装必要的工具”选项来解决这个问题
我正在使用命令“npm init wdio”设置 wdio 并尝试 运行 测试文件。它给出以下错误
Failed launching test session: Error: Couldn't initialise "@wdio/cucumber-framework". [0-0] Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/formatter/helpers/event_data_collector' is not defined by
下面是我的package.json文件
"name": "wdio-new",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"wdio": "wdio run wdio.conf.js"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@wdio/cli": "^7.16.12",
"@wdio/cucumber-framework": "^7.16.12",
"@wdio/local-runner": "^7.16.12",
"@wdio/spec-reporter": "^7.16.11",
"chromedriver": "^96.0.0",
"wdio-chromedriver-service": "^7.2.2"
}
}
我设法通过重新安装节点并在安装过程中选中“自动安装必要的工具”选项来解决这个问题