Open ybarbaria opened 7 years ago
Could the 404 on config.json
be causing unexpected behavior?
For me, without test :
$ npm run test
> my-app@1.2.2-0-SNAPSHOT.0 test C:\my-app
> karma start
START:
Finished in 0.001 secs / 0 secs @ 13:25:32 GMT+0100 (Paris, Madrid)
SUMMARY:
√ 0 tests completed
=============================== Coverage summary ===============================
Statements : 100% ( 0/0 )
Branches : 100% ( 0/0 )
Functions : 100% ( 0/0 )
Lines : 100% ( 0/0 )
================================================================================
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-app@2018.2.2-0-SNAPSHOT.0 test: `karma start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app@2018.2.2-0-SNAPSHOT.0 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\my-app\node_cache\_logs\2018-02-21T12_25_33_090Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\CVeyssiere\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'test' ]
2 info using npm@5.3.0
3 info using node@v8.5.0
4 verbose run-script [ 'pretest', 'test', 'posttest' ]
5 info lifecycle my-app@1.2.2-0-SNAPSHOT.0~pretest: my-app@1.2.2-0-SNAPSHOT.0
6 info lifecycle my-app@1.2.2-0-SNAPSHOT.0~test: my-app@1.2.2-0-SNAPSHOT.0
7 verbose lifecycle my-app@1.2.2-0-SNAPSHOT.0~test: unsafe-perm in lifecycle true
8 verbose lifecycle my-app@1.2.2-0-SNAPSHOT.0~test: PATH: C:\Users\CVeyssiere\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\my-app\node_modules\.bin;C:\Users\CVeyssiere\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\CVeyssiere\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.8.0_144\bin;C:\Program Files (x86)\Groovy\Groovy-1.7.5\bin;C:\Program Files\SlikSvn\bin;C:\ProgramData\graphviz-2.38\bin;C:\Program Files (x86)\Meld;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files (x86)\Bitvise SSH Client;C:\Program Files (x86)\ShoreTel\Connect;C:\Program Files (x86)\ShoreTel\Connect\win64;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files (x86)\apache-maven-3.3.9\bin;C:\Program Files\SlikSvn\bin;C:\Program Files (x86)\Meld;C:\Program Files (x86)\Midnight Commander;C:\Users\CVeyssiere\AppData\Local\Microsoft\WindowsApps;C:\Users\CVeyssiere\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle my-app@1.2.2-0-SNAPSHOT.0~test: CWD: C:\my-app
10 silly lifecycle my-app@1.2.2-0-SNAPSHOT.0~test: Args: [ '/d /s /c', 'karma start' ]
11 silly lifecycle my-app@1.2.2-0-SNAPSHOT.0~test: Returned: code: 1 signal: null
12 info lifecycle my-app@1.2.2-0-SNAPSHOT.0~test: Failed to exec test script
13 verbose stack Error: my-app@1.2.2-0-SNAPSHOT.0 test: `karma start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\CVeyssiere\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:289:16)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at EventEmitter.emit (events.js:213:7)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\CVeyssiere\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14)
13 verbose stack at emitTwo (events.js:125:13)
13 verbose stack at ChildProcess.emit (events.js:213:7)
13 verbose stack at maybeClose (internal/child_process.js:927:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid my-app@1.2.2-0-SNAPSHOT.0
15 verbose cwd C:\my-app
16 verbose Windows_NT 10.0.16299
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\CVeyssiere\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "test"
18 verbose node v8.5.0
19 verbose npm v5.3.0
20 error code ELIFECYCLE
21 error errno 1
22 error my-app@1.2.2-0-SNAPSHOT.0 test: `karma start`
22 error Exit status 1
23 error Failed at the my-app@1.2.2-0-SNAPSHOT.0 test script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
With 1 test:
$ npm run test
> my-app@1.2.2-0-SNAPSHOT.0 test C:\my-app
> karma start
START:
[at-loader] Using typescript@2.7.1 from typescript and "tsconfig.json" from C:\my-app/tsconfig.json.
[at-loader] Checking started in a separate process...
[at-loader] Ok, 2.348 sec.
[at-loader] Checking started in a separate process...
[at-loader] Ok, 0.008 sec.
App
√ TBC
Finished in 0.498 secs / 0.115 secs @ 14:06:01 GMT+0100 (Paris, Madrid)
SUMMARY:
√ 1 test completed
=============================== Coverage summary ===============================
Statements : 32.55% ( 2424/7448 )
Branches : 6.62% ( 97/1466 )
Functions : 19.66% ( 292/1485 )
Lines : 30.1% ( 2071/6881 )
================================================================================
Probably without test, it works badly
We too struggle with similar issue, a slightly different usecase though. I think its not the 404 causing it. In our case, we use gradle (with parallel threads to improve build performance) and start karma runner from gradle; we too have same error. Our environment -
we see below cryptic error
12 info lifecycle <my app>@<version>~test:logger: Failed to exec test:logger script 13 verbose stack Error: <my app>@<version> test:logger: ng test logger --code-coverage 13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (<node installatio path>\nodejs\node-v10.4.1-win-x64\node_modules\npm\node_modules\npm-lifecycle\index.js:304:16) 13 verbose stack at EventEmitter.emit (events.js:182:13) 13 verbose stack at ChildProcess.<anonymous> (<node installatio path>\nodejs\node-v10.4.1-win-x64\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:182:13) 13 verbose stack at maybeClose (internal/child_process.js:961:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
Suggestion mentioned at https://github.com/karma-runner/karma-chrome-launcher/issues/154 worked for us.
TeamCity failed during runing karma unit tests.
The log catched in the overview of teamcity
And the npm-debug-log from the buildAgent folder :
Versions Windows_NT 6.1.7601 node v6.9.1 v3.10.8 "karma": "1.5.0" "karma-phantomjs-launcher": "1.0.4" "karma-teamcity-reporter": "1.0.1" "karma-webpack": "2.0.2"
If someone have an idea about this bug ?