mucsi96 / nightwatch-api

[DEPRECATED] Cross-runner API for Nightwatch.js
https://nightwatch-api.netlify.com/
MIT License
84 stars 64 forks source link

"runner.startWebDriver is not a function" thrown after upgrading to nightwatch 2.0.4 #950

Open cvacalares opened 2 years ago

cvacalares commented 2 years ago

Expected Behavior

Is the current nightwatch-api compatible with nightwatch 2.0.4?

Current Behavior

After installing the latest nightwatch 2.0.4, my scripts are now failing with an error "runner.startWebDriver is not a function". TypeError: runner.startWebDriver is not a function

Steps to Reproduce (for bugs)

Set the package.json to "nightwatch": "2.0.4" and install it.

      1. 4.

Context

I'm trying to use the latest nightwatch since it has new features and bug fixes.

Your Environment

cvacalares commented 2 years ago

I found this as well.

npm resolution error report

2022-02-03T07:54:37.695Z

Found: nightwatch@2.0.4 node_modules/nightwatch dev nightwatch@"^2.0.4" from the root project

Could not resolve dependency: peer nightwatch@"^1.3.0" from nightwatch-api@3.0.1 node_modules/nightwatch-api dev nightwatch-api@"^3.0.1" from the root project

Fix the upstream dependency conflict, or retry this command with --force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.

Raw JSON explanation object:

{ "code": "ERESOLVE", "current": { "name": "nightwatch", "version": "2.0.4", "location": "node_modules/nightwatch", "dependents": [ { "type": "dev", "name": "nightwatch", "spec": "^2.0.4", "from": { "location": "C:\work\breedinginsight\cucumber" } } ] }, "currentEdge": null, "edge": { "type": "peer", "name": "nightwatch", "spec": "^1.3.0", "error": "INVALID", "from": { "name": "nightwatch-api", "version": "3.0.1", "location": "node_modules/nightwatch-api", "dependents": [ { "type": "dev", "name": "nightwatch-api", "spec": "^3.0.1", "from": { "location": "C:\work\breedinginsight\cucumber" } } ] } }, "peerConflict": null, "strictPeerDeps": false, "force": false }

icloudphil-exp commented 2 years ago

looks like this has to deal with the dependency upgrade, @cvacalares is this something you would like to raise a PR, we can try to ping to get approve on the PR. Thanks!

ituradastra commented 1 year ago

Facing the same problem. It is not possible to upgrade to the latest version of Nightwatch

ituradastra commented 1 year ago

I am facing the same problem.

icloudphil commented 1 year ago

@ituradastra something to consider is to adopt nightwatch v2+ directly.

ituradastra commented 1 year ago

@icloudphil thank you. I considered it, I have a lot of tests written in nightwatch-api and cucumber, and adopting nightwatch v2 directly requires a lot of changes in my current set up. If you have some examples how to make the migration easier, please share it. At the end I think I will need to switch to nightwatch v2