2017-10-09 5 views
-1

npm run project_oneでナイトウォッチプロジェクトを実行しようとすると、私はこの応答を受け取ります。アクションを実行しようとしているソースフォルダを読み取ることができません

There was an error while starting the test runner: 

Error: Cannot read source folder: /Users/BenyJo/examples/tests 
    at /Users/BenyJo/node_modules/nightwatch/lib/runner/run.js:203:21 
    at /Users/BenyJo/node_modules/nightwatch/lib/runner/walk.js:97:18 
    at FSReqWrap.oncomplete (fs.js:153:21) 

npm ERR! code ELIFECYCLE 
npm ERR! errno 1 
npm ERR! [email protected] project_one: `nightwatch` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] project_one script. 
npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 

次のように私は、NPMを使用して、任意の夜警のコマンドを使用するたびに、私は同じエラーを取得し、私のナイトウォッチの設定は次のとおりです。

{ 
    "src_folders" : ["tests"], 
    "output_folder" : "reports", 

    "selenium" : { 
    "start_process" : true, 
    "server_path" : "./bin/selenium_v360.jar", 
    "log_path" : "", 
    "port" : 4444, 
    "cli_args" : { 
     "webdriver.chrome.driver" : "./bin/chromedriver" 
    } 
    }, 

    "test_settings" : { 
    "default" : { 
     "launch_url" : "http://localhost", 
     "selenium_port" : 4444, 
     "selenium_host" : "localhost", 
     "desiredCapabilities": { 
     "browserName": "chrome", 
     "javascriptEnabled": true, 
     "acceptSslCerts": true 
     } 
    } 
    } 
} 

screenshot

私はそのエラーに気づきました、ファイルが呼び出されていない、そこにnightwatchフォルダがあるはずです。/Users/BenyJo/examples/tests

+0

[コードやエラーの画像を投稿しないでください!](https://meta.stackoverflow.com/q/303812/995714) – Rob

答えて

1

同じ問題があった場合、設定ファイル名にタイプミスがありました。それは "nightwatch.json"(私の名前は "nightwatch.js")という名前にする必要があります。

関連する問題