An error occurred while trying to start ChromeDriver: cannot resolve path: "/node_modules/.bin/chromedriver" An error occurred while trying to start ChromeDriver: cannot resolve path: "/node_modules/.bin/chromedriver" selenium selenium

An error occurred while trying to start ChromeDriver: cannot resolve path: "/node_modules/.bin/chromedriver"


Finally, I got a solution when I show his git account of the tutorial also post the solution too.

https://github.com/coding-with-dom/intro-to-nightwatchjs/commit/a2e0e05351c9e1c9e108bdf1083ae2a03e0296d1

enter image description here

I just need to change my file nightwatch.conf.js

module.exports = {  "src_folders" : ["tests"],  "webdriver" : {    "start_process": true,    "server_path": require('chromedriver').path,    "port": 9515  },  "test_settings" : {    "default" : {      "desiredCapabilities": {        "browserName": "chrome"      }    }  }}