2017-07-31 45 views
0

我已經使用上的ionic2茉莉量角器開始application.I有沒有得到關於網絡搜索清除兩大疑惑:當規範失敗時,如何從量角器的日誌中刪除npm錯誤?

1)當我的任何規格的失敗試驗,顯示錯誤與npm錯誤,在如下圖所示:

1) App Component navigates to the next pagr on click 
    - Expected 'Ionic Blank' to match 'Page1'. 

Executed 2 of 2 specs (1 FAILED) in 7 secs. 
[20:22:55] I/launcher - 0 instance(s) of WebDriver still running 
[20:22:55] I/launcher - chrome #01 failed 1 test(s) 
[20:22:55] I/launcher - overall: 1 failed spec(s) 
[20:22:55] E/launcher - Process exited with error code 1 

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" "e2e-test" 
npm ERR! node v6.9.5 
npm ERR! npm v3.10.10 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] e2e-test: `protractor ./test-config/protractor.conf.js` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] e2e-test script 'protractor ./test-config/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 ionic-hello-world package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  protractor ./test-config/protractor.conf.js 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs ionic-hello-world 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls ionic-hello-world 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  C:\Users\Lenovo\testing\npm-debug.log 

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" "e2e" 
npm ERR! node v6.9.5 
npm ERR! npm v3.10.10 
npm ERR! code ELIFECYCLE 
npm ERR! [email protected] e2e: `npm run e2e-update && npm run e2e-test` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] e2e script 'npm run e2e-update && npm run e2e-test'. 
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 ionic-hello-world package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  npm run e2e-update && npm run e2e-test 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs ionic-hello-world 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls ionic-hello-world 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  C:\Users\Lenovo\testing\npm-debug.log 

2)什麼是這些錯誤與日誌的TE addtion背後的原因是什麼?

回答

0

NPM正在拋出錯誤,因爲量角器報告錯誤 - 錯誤是您的測試失敗。 'npm err'這一行是標準的NPM錯誤報告,旨在幫助人們使用外部軟件包,並且通常沒有很多有用的信息。

我發現你可以通過添加||來防止這種情況。對於npm腳本的末尾或通過用||調用它

npm e2e || true 

這是唯一真正有用的,如果一個錯誤將停止別的事情的發生 - 在我的情況,我需要一個詹金斯建立不失敗:真。

相關問題