我一直在用量角器掙扎幾個小時,而且我還沒有能夠運行我的第一個測試。要啓動它,我使用npm run e2e
,產生了以下錯誤:量角器錯誤
ERR! code ELIFECYCLE
[1] npm ERR! errno 1
[1] npm ERR! [email protected] protractor: `protractor
protractor.config.js`
[1] npm ERR! Exit status 1
[1] npm ERR!
[1] npm ERR! Failed at the [email protected] protractor script 'protractor protractor.config.js'.
[1] npm ERR! Make sure you have the latest version of node.js and npm installed.
[1] npm ERR! If you do, this is most likely a problem with the angular-quickstart package,
[1] npm ERR! not with npm itself.
[1] npm ERR! Tell the author that this fails on your system:
[1] npm ERR! protractor protractor.config.js
[1] npm ERR! You can get information on how to open an issue for this project with:
[1] npm ERR! npm bugs angular-quickstart
[1] npm ERR! Or if that isn't available, you can get their info via:
[1] npm ERR! npm owner ls angular-quickstart
[1] npm ERR! There is likely additional logging output above.
[1]
[1] npm ERR! A complete log of this run can be found in:
[1] npm ERR! C:\Users\Jesper\AppData\Roaming\npm-cache\_logs\2017-05-08T22_41_36_233Z-debug.log
[1] npm run protractor exited with code 1
--> Sending SIGTERM to other processes..
[0] npm run serve:e2e exited with code 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] e2e: `concurrently "npm run serve:e2e" "npm
run protractor" --kill-others --success first`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] e2e script 'concurrently "npm
run serve:e2e" "npm run protractor" --kill-others --success first'.
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-quickstart
package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! concurrently "npm run serve:e2e" "npm run protractor" --kill-others --success first
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular-quickstart
npm ERR! There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Jesper\AppData\Roaming\npm-cache\_logs\2017-05-
08T22_24_18_355Z-debug.log
我完全不知道該怎麼在這一點上做的。我能做些什麼來解決這個錯誤?我已經更新了nodes.js和npm。他們的版本分別是6.10.3和4.5.0。
此外,我不知道我是否應該有2個配置文件。我找到了一個指導,告訴我要創建一個config.js
文件,我在我的e2e
文件夾中做了這個。我還發現一個protractor.config.js
文件,我猜是默認情況下在angular-quickstart項目中。都需要,或者我應該刪除conf.js
?
這裏的日誌文件的內容:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Jesper\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'e2e' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'pree2e', 'e2e', 'poste2e' ]
5 info lifecycle [email protected]~pree2e: [email protected]
6 verbose lifecycle [email protected]~pree2e: unsafe-perm in lifecycle true
7 verbose lifecycle [email protected]~pree2e: PATH: C:\Users\Jesper\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\Users\Jesper\Documents\GitHub\StudentDatabaseFrontEnd\Student Database\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Brackets\command;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Skype\Phone\;C:\Users\Jesper\AppData\Roaming\npm;C:\Users\Jesper\AppData\Local\Microsoft\WindowsApps;;C:\Program Files (x86)\Microsoft VS Code\bin
8 verbose lifecycle [email protected]~pree2e: CWD: C:\Users\Jesper\Documents\GitHub\StudentDatabaseFrontEnd\Student Database
9 silly lifecycle [email protected]~pree2e: Args: [ '/d /s /c', 'npm run build:e2e' ]
10 silly lifecycle [email protected]~pree2e: Returned: code: 0 signal: null
11 info lifecycle [email protected]~e2e: [email protected]
12 verbose lifecycle [email protected]~e2e: unsafe-perm in lifecycle true
13 verbose lifecycle [email protected]~e2e: PATH: C:\Users\Jesper\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\Users\Jesper\Documents\GitHub\StudentDatabaseFrontEnd\Student Database\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Brackets\command;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Skype\Phone\;C:\Users\Jesper\AppData\Roaming\npm;C:\Users\Jesper\AppData\Local\Microsoft\WindowsApps;;C:\Program Files (x86)\Microsoft VS Code\bin
14 verbose lifecycle [email protected]~e2e: CWD: C:\Users\Jesper\Documents\GitHub\StudentDatabaseFrontEnd\Student Database
15 silly lifecycle [email protected]~e2e: Args: [ '/d /s /c',
15 silly lifecycle 'concurrently "npm run serve:e2e" "npm run protractor" --kill-others --success first' ]
16 silly lifecycle [email protected]~e2e: Returned: code: 1 signal: null
17 info lifecycle [email protected]~e2e: Failed to exec e2e script
18 verbose stack Error: [email protected] e2e: `concurrently "npm run serve:e2e" "npm run protractor" --kill-others --success first`
18 verbose stack Exit status 1
18 verbose stack at EventEmitter.<anonymous> (C:\Users\Jesper\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:279:16)
18 verbose stack at emitTwo (events.js:106:13)
18 verbose stack at EventEmitter.emit (events.js:191:7)
18 verbose stack at ChildProcess.<anonymous> (C:\Users\Jesper\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
18 verbose stack at emitTwo (events.js:106:13)
18 verbose stack at ChildProcess.emit (events.js:191:7)
18 verbose stack at maybeClose (internal/child_process.js:886:16)
18 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
19 verbose pkgid [email protected]
20 verbose cwd C:\Users\Jesper\Documents\GitHub\StudentDatabaseFrontEnd\Student Database\e2e
21 verbose Windows_NT 10.0.14393
22 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Jesper\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "e2e"
23 verbose node v6.10.3
24 verbose npm v4.5.0
25 error code ELIFECYCLE
26 error errno 1
27 error [email protected] e2e: `concurrently "npm run serve:e2e" "npm run protractor" --kill-others --success first`
27 error Exit status 1
28 error Failed at the [email protected] e2e script 'concurrently "npm run serve:e2e" "npm run protractor" --kill-others --success first'.
28 error Make sure you have the latest version of node.js and npm installed.
28 error If you do, this is most likely a problem with the angular-quickstart package,
28 error not with npm itself.
28 error Tell the author that this fails on your system:
28 error concurrently "npm run serve:e2e" "npm run protractor" --kill-others --success first
28 error You can get information on how to open an issue for this project with:
28 error npm bugs angular-quickstart
28 error Or if that isn't available, you can get their info via:
28 error npm owner ls angular-quickstart
28 error There is likely additional logging output above.
29 verbose exit [ 1, true ]
這是我的文件夾結構:
你可以在這裏過濾package.json的內容嗎?從debug.log中,在運行測試腳本之前,在package.json中配置了一些預置步驟。失敗應該由這些前置步驟引起。 – yong