Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cvacalares opened this issue Feb 3, 2022 · 6 comments

Comments

@cvacalares
Copy link

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.

Context

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

Your Environment

  • Version used: nigthwatch-api 3.0.4, "@cucumber/cucumber": "^7.3.2", "nightwatch": "2.0.4"
  • Browser Name and version: Chrome 97
  • Operating System and version (desktop or mobile): Windows 10
@cvacalares
Copy link
Author

I found this as well.

npm resolution error report

2022-02-03T07:54:37.695Z

Found: [email protected]
node_modules/nightwatch
dev nightwatch@"^2.0.4" from the root project

Could not resolve dependency:
peer nightwatch@"^1.3.0" from [email protected]
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
Copy link

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
Copy link

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

@ituradastra
Copy link

I am facing the same problem.

@icloudphil
Copy link

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

@ituradastra
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants