2016-11-11 11 views
1

すべてがうまくいきます。私はNode.jsで初めて分度器をセットアップしていますこれは「E2Eテストの実行」の下にAngularJSウェブサイト上のチュートリアルの一部として提供されています https://docs.angularjs.org/tutorialNode.jsコマンドプロンプトから分度器を起動できません

しかし、「NPMの実行分度器」提供されるコマンドを通じて分度器を実行しながら、私はNode.jsの中に次のエラーを取得しますコマンドプロンプト:ここ

E/launcher - Process exited with error code 199 

npm ERR! Windows_NT 10.0.14393 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "protractor" 
npm ERR! node v6.9.1 
npm ERR! npm v3.10.8 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] protractor: `protractor e2e-tests/protractor.conf.js` 
npm ERR! Exit status 199 
npm ERR! 
npm ERR! Failed at the [email protected] protractor script 'protractor e2e-tests/protractor.conf.js'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the angular-phonecat package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  protractor e2e-tests/protractor.conf.js 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs angular-phonecat 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls angular-phonecat 
npm ERR! There is likely additional logging output above. 

はpackage.jsonファイルの内容です:

{ 
    "name": "angular-phonecat", 
    "private": true, 
    "version": "0.0.0", 
    "description": "A tutorial application for AngularJS", 
    "repository": "https://github.com/angular/angular-phonecat", 
    "license": "MIT", 
    "devDependencies": { 
    "bower": "^1.7.7", 
    "http-server": "^0.9.0", 
    "jasmine-core": "^2.4.1", 
    "karma": "^0.13.22", 
    "karma-chrome-launcher": "^0.2.3", 
    "karma-firefox-launcher": "^0.1.7", 
    "karma-jasmine": "^0.3.8", 
    "protractor": "^4.0.9" 
    }, 
    "scripts": { 
    "postinstall": "bower install", 
    "prestart": "npm install", 
    "start": "http-server ./app -a localhost -p 8000 -c-1", 
    "pretest": "npm install", 
    "test": "karma start karma.conf.js", 
    "test-single-run": "karma start karma.conf.js --single-run", 
    "preupdate-webdriver": "npm install", 
    "update-webdriver": "webdriver-manager update", 
    "preprotractor": "npm run update-webdriver", 
    "protractor": "protractor e2e-tests/protractor.conf.js", 
    "update-index-async": "node -e \"var fs=require('fs'),indexFile='app/index-async.html',loaderFile='app/bower_components/angular-loader/angular-loader.min.js',loaderText=fs.readFileSync(loaderFile,'utf-8').split(/sourceMappingURL=angular-loader.min.js.map/).join('sourceMappingURL=bower_components/angular-loader/angular-loader.min.js.map'),indexText=fs.readFileSync(indexFile,'utf-8').split(/\\/\\/@@[email protected]@[\\s\\S]*\\/\\/@@[email protected]@/).join('//@@[email protected]@\\n'+loaderText+' //@@[email protected]@');fs.writeFileSync(indexFile,indexText);\"" 
    } 
} 

誰にもこれと同じチュートリアルを試みたと同じ問題を取得している場合、私は知らないのですか?どんな助けでも大歓迎です、ありがとうございます。

+0

はあなたが始めた:

./node_modules/.bin/webdriver-manager update --standalone=false --gecko=false 

またはそれに加えて、ダウンロードなるgithub angular-seed pageで提案されているように、セレンスタンドアロンのjarファイルと(Firefox用に使用される)ヤモリドライバ

セレンのサーバー? –

+0

package.jsonが置かれているフォルダから 'npm run protractor'コマンドを実行する必要があります。また、' package.json 'ファイルの内容を投稿することもできます –

+0

セレンサーバDannyを起動したかどうかは分かりませんが、私が確認する方法をアドバイスできますか?確かにSudharsen、私は質問にpackage.jsonファイルの内容を追加しました。 – AnderSco01

答えて

1

投射器はいくつかの方法で起動できます。最も一般的なものはdirectConnectまたはseleniumAddressです。 e2e-tests/protractor.config.jsファイルに値が設定されていないため、想定値はdirectConnectです。クロムブラウザでdirectConnectを使用するには、最新のクロムドライバを入手する必要があります。ただchromedriverをインストールするには:

npm update-webdriver 
関連する問題