How to integrate Karma with TeamCity - teamcity

I am able to run tests via Karma in TeamCity since you can run anything that's accessible via command line. But, TeamCity only reports overall pass/fail -- does not report details of any failed tests. If it fails, I just get "Process exited with code 1".
The karma homepage says there is a teamcity integration, but the teamcity link says "Not available yet".
There seems to be a GIT project with npm install package. But, the npm install failed with messages that don't mean much to me.
> npm http GET https://registry.npmjs.org/karma-teamcity-reporter npm
> http 304 https://registry.npmjs.org/karma-teamcity-reporter npm http
> GET https://registry.npmjs.org/karma npm http 304
> https://registry.npmjs.org/karma npm WARN `git config --get
> remote.origin.url` returned wrong result
> (git://github.com/vojtajina/node-di.git) undefined npm WARN `git
> config --get remote.origin.url` returned wrong result
> (git://github.com/vojtajina/node-di.git) undefined npm http GET
> https://registry.npmjs.org/chokidar npm http GET
> https://registry.npmjs.org/socket.io npm http GET
> https://registry.npmjs.org/http-proxy npm http GET
> https://registry.npmjs.org/glob npm http GET
> https://registry.npmjs.org/optimist npm http GET
> https://registry.npmjs.org/coffee-script npm http GET
> https://registry.npmjs.org/colors/0.6.0-1 npm http GET
> https://registry.npmjs.org/minimatch npm http GET
> https://registry.npmjs.org/pause/0.0.1 npm http GET
> https://registry.npmjs.org/mime npm ERR! git clone
> git://github.com/vojtajina/node-di.git undefined npm ERR! git clone
> git://github.com/vojtajina/node-di.git undefined npm http GET
> https://registry.npmjs.org/q npm http GET
> https://registry.npmjs.org/lodash npm http GET
> https://registry.npmjs.org/log4js npm http GET
> https://registry.npmjs.org/rimraf npm ERR! Error: spawn ENOENT npm
> ERR! at errnoException (child_process.js:975:11) npm ERR! at
> Process.ChildProcess._handle.onexit (child_process.js:766:34) npm ERR!
> If you need help, you may report this log at: npm ERR!
> <http://github.com/isaacs/npm/issues> npm ERR! or email it to: npm
> ERR! <npm-#googlegroups.com>
>
> npm ERR! System Windows_NT 6.1.7601 npm ERR! command "C:\\Program
> Files\\nodejs\\\\node.exe" "C:\\Program
> Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
> "karma-teamcity-reporter" npm ERR! cwd C:\Users\steve npm ERR! node -v
> v0.10.5 npm ERR! npm -v 1.2.18 npm ERR! syscall spawn npm ERR! code
> ENOENT npm ERR! errno ENOENT npm http 304
> https://registry.npmjs.org/chokidar npm http 304
> https://registry.npmjs.org/optimist npm http 304
> https://registry.npmjs.org/socket.io npm http 304
> https://registry.npmjs.org/glob npm http 304
> https://registry.npmjs.org/http-proxy npm http 304
> https://registry.npmjs.org/coffee-script npm http 304
> https://registry.npmjs.org/colors/0.6.0-1 npm http 304
> https://registry.npmjs.org/minimatch npm http 304
> https://registry.npmjs.org/mime npm http 304
> https://registry.npmjs.org/pause/0.0.1 npm http 304
> https://registry.npmjs.org/q npm http 304
> https://registry.npmjs.org/lodash npm http 304
> https://registry.npmjs.org/log4js npm http 304
> https://registry.npmjs.org/rimraf npm ERR! npm ERR! Additional
> logging details can be found in: npm ERR!
> C:\Users\steve\npm-debug.log npm ERR! not ok code 0
I'm new to npm. So maybe I'm doing something wrong with npm. But, even if the npm install works, then what do I do? Should I expect the next teamcity run of karma to include the special teamcity log messages?
Anyone know how to fully integrate Karma into teamcity?

Use stable karma, which contains the teamcity reporter.
npm install -g karma
And then, use teamcity reporter, it will generate teamcity output on the stdout.
karma start --reporters teamcity --single-run

Related

Unable to install yarn

I installed node v16.15.1, npm v8.12.2 enter image description here
$ npm install -g yarn
npm WARN config global --global, --local are deprecated. Use --location=global instead.
npm ERR! code E404
npm ERR! 404 Not Found - GET https://skimdb.npmjs.com/registry/yarn/-/yarn-1.22.19.tgz - not_found
npm ERR! 404
npm ERR! 404 'yarn#https://skimdb.npmjs.com/registry/yarn/-/yarn-1.22.19.tgz' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Admin\AppData\Local\npm-cache_logs\2022-06-25T07_47_50_510Z-debug-0.log

npm node-gyp install issues on Windows 7

So, I don't know what was wrong before, but the solution was to uninstall Node completely and reinstall it. It came with the module already. I haven't figured out how to use it though because typing node-gyp doesn't work.
I am trying to install node-gyp using Node 8.1 (because I have to use this version). When I type
npm install -g node-gyp
I get the error message "SSL Error: SELF_SIGNED_CERT_IN_CHAIN"
I'm using npm 1.1.33, which I thought might be a problem, so I tried to upgrade using npm by following this link.
Dallas Brittany#ZTALEI ~
$ npm config set ca ""
Dallas Brittany#ZTALEI ~
$ npm install npm -g
npm http GET https://registry.npmjs.org/npm
npm http 200 https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm/-/npm-1.4.15.tgz
npm http 200 https://registry.npmjs.org/npm/-/npm-1.4.15.tgz
C:\Users\Dallas Brittany\AppData\Roaming\npm\npm -> C:\Users\Dallas Brittany\Ap
Data\Roaming\npm\node_modules\npm\bin\npm-cli.js
npm#1.4.15 C:\Users\Dallas Brittany\AppData\Roaming\npm\node_modules\npm
Dallas Brittany#ZTALEI ~
$ npm -v
1.1.33
But, as you can see, it didn't upgrade anything. So I also tried
npm install npm-latest
and got the following:
npm http GET https://registry.npmjs.org/npm-latest
npm http 304 https://registry.npmjs.org/npm-latest
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/vcsurl
npm http 304 https://registry.npmjs.org/lodash
npm ERR! Error: No compatible version found: lodash#'^2.4.1'
npm ERR! Valid install targets:
npm ERR! ["0.1.0","0.2.0","0.2.1","0.2.2","0.3.0","0.3.1","0.3.2","0.4.0","0.4.1
","0.4.2","0.5.0-rc.1","0.5.0","0.5.1","0.5.2","0.6.0","0.6.1","0.7.0","0.8.0","
0.8.1","0.8.2","0.9.0","0.9.1","0.9.2","0.10.0","1.0.0-rc.1","1.0.0-rc.2","1.0.0
-rc.3","1.0.0","1.0.1","1.1.0","1.1.1","1.2.0","1.2.1","1.3.0","1.3.1","2.0.0","
2.1.0","2.2.0","2.2.1","2.3.0","2.4.0","2.4.1"]
npm ERR! at installTargetsError (c:\Program Files (x86)\nodejs\node_modules\
npm\lib\cache.js:586:10)
npm ERR! at c:\Program Files (x86)\nodejs\node_modules\npm\lib\cache.js:464:
15
npm ERR! at saved (c:\Program Files (x86)\nodejs\node_modules\npm\node_modul
es\npm-registry-client\lib\get.js:136:7)
npm ERR! at c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\grac
eful-fs\graceful-fs.js:230:7
npm ERR! at Object.oncomplete (fs.js:297:15)
npm ERR! [Error: No compatible version found: lodash#'^2.4.1'
npm ERR! Valid install targets:
npm ERR! ["0.1.0","0.2.0","0.2.1","0.2.2","0.3.0","0.3.1","0.3.2","0.4.0","0.4.1
","0.4.2","0.5.0-rc.1","0.5.0","0.5.1","0.5.2","0.6.0","0.6.1","0.7.0","0.8.0","
0.8.1","0.8.2","0.9.0","0.9.1","0.9.2","0.10.0","1.0.0-rc.1","1.0.0-rc.2","1.0.0
-rc.3","1.0.0","1.0.1","1.1.0","1.1.1","1.2.0","1.2.1","1.3.0","1.3.1","2.0.0","
2.1.0","2.2.0","2.2.1","2.3.0","2.4.0","2.4.1"]]
npm ERR! You may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "c:\\Program Files (x86)\\nodejs\\node.exe" "c:\\Program Files
(x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "npm-latest"
npm ERR! cwd C:\Users\Dallas Brittany
npm ERR! node -v v0.8.1
npm ERR! npm -v 1.1.33
npm ERR! message No compatible version found: lodash#'^2.4.1'
npm ERR! message Valid install targets:
npm ERR! message ["0.1.0","0.2.0","0.2.1","0.2.2","0.3.0","0.3.1","0.3.2","0.4.0
","0.4.1","0.4.2","0.5.0-rc.1","0.5.0","0.5.1","0.5.2","0.6.0","0.6.1","0.7.0","
0.8.0","0.8.1","0.8.2","0.9.0","0.9.1","0.9.2","0.10.0","1.0.0-rc.1","1.0.0-rc.2
","1.0.0-rc.3","1.0.0","1.0.1","1.1.0","1.1.1","1.2.0","1.2.1","1.3.0","1.3.1","
2.0.0","2.1.0","2.2.0","2.2.1","2.3.0","2.4.0","2.4.1"]
npm http 304 https://registry.npmjs.org/vcsurl
npm http 304 https://registry.npmjs.org/request
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\Dallas Brittany\npm-debug.log
npm ERR! not ok code 0
Any suggestions?
Thanks.

mongoose npm install on windows 7 fail

I try to install mongoose on windows 64bit 7 by using
npm install mongoose
but I receive following error
C:\>npm install mongoose
npm http GET https://registry.npmjs.org/mongoose
npm http 304 https://registry.npmjs.org/mongoose
npm http GET https://registry.npmjs.org/ms/0.1.0
npm http GET https://registry.npmjs.org/hooks/0.2.1
npm http GET https://registry.npmjs.org/mongodb/1.3.3
npm http GET https://registry.npmjs.org/mpromise/0.2.1
npm http GET https://registry.npmjs.org/muri/0.3.1
npm http GET https://registry.npmjs.org/sliced/0.0.3
npm http GET https://registry.npmjs.org/mpath/0.1.1
npm http 304 https://registry.npmjs.org/mpromise/0.2.1
npm http 304 https://registry.npmjs.org/ms/0.1.0
npm http 304 https://registry.npmjs.org/hooks/0.2.1
npm http 304 https://registry.npmjs.org/muri/0.3.1
npm http 304 https://registry.npmjs.org/mongodb/1.3.3
npm http 304 https://registry.npmjs.org/sliced/0.0.3
npm http 304 https://registry.npmjs.org/mpath/0.1.1
npm http GET https://registry.npmjs.org/sliced/0.0.4
npm http GET https://registry.npmjs.org/bson/0.1.8
npm http GET https://registry.npmjs.org/kerberos
npm http 304 https://registry.npmjs.org/sliced/0.0.4
npm http 304 https://registry.npmjs.org/kerberos
npm http 304 https://registry.npmjs.org/bson/0.1.8
> kerberos#0.0.2 install C:\node_modules\mongoose\node_modules\mongodb\node_modules\kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0)
npm WARN optional dep failed, continuing kerberos#0.0.2
> bson#0.1.8 install C:\node_modules\mongoose\node_modules\mongodb\node_modules\bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)
npm ERR! bson#0.1.8 install: `(node-gyp rebuild 2> builderror.log) || (exit 0)`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the bson#0.1.8 install script.
npm ERR! This is most likely a problem with the bson package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! (node-gyp rebuild 2> builderror.log) || (exit 0)
npm ERR! You can get their info via:
npm ERR! npm owner ls bson
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "mongoose"
npm ERR! cwd C:\
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.18
npm ERR! syscall spawn
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\npm-debug.log
npm ERR! not ok code 0
C:\>
I had the same problem when trying to install mongoose. Updating node to the latest version ( currently 0.10.7) and installing mongoose again fixed my problem.

grunt-contrib-build' is not in the npm registry

I'm getting below error when I try to install npm install grunt-contrib-build --save-dev on my Windows 7 system using command prompt.
C:\css-base>npm install grunt-contrib-build --save-dev
npm WARN package.json my-project#0.1.0 No README.md file found!
npm http GET https://registry.npmjs.org/grunt-contrib-build
npm http 404 https://registry.npmjs.org/grunt-contrib-build
npm ERR! 404 'grunt-contrib-build' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "grunt-contrib-build" "--save
-dev"
npm ERR! cwd C:\css-base
npm ERR! node -v v0.10.3
npm ERR! npm -v 1.2.17
npm ERR! code E404
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\css-base\npm-debug.log
npm ERR! not ok code 0
If anyone finds this while trying to install this plugin:
grunt-contrib-build
is now called
grunt-usemin
However the tasks in the new plugin might not be supported, please check
https://github.com/yeoman/grunt-usemin/issues/3 for more information.
Have you tried reading the error message?
npm ERR! 404 'grunt-contrib-build' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it

Mac cant install socket.io with npm/nodejs?

I have been searching for hours now and I still have no answer for this problem.
I have mac os x version 10.6.8
I installed nodejs from nodejs.org. Version is v0.6.14.
I did this in terminal to check npm: npm --version. npm version is 1.1.12
after that I tried npm install socket.io and I got this error...
pm http GET https://registry.npmjs.org/socket.io
npm http 304 https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/socket.io-client/0.9.3
npm http GET https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/redis/0.6.7
npm http 304 https://registry.npmjs.org/redis/0.6.7
npm http 304 https://registry.npmjs.org/policyfile/0.0.4
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.3
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/xmlhttprequest/1.2.2
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 304 https://registry.npmjs.org/ws
npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.2.2
npm http 304 https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/zeparser/0.0.5
> ws#0.4.11 preinstall /Users/NAME/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> make
execvp(): No such file or directory
npm ERR! Error: ENOENT, open '/Users/NAME/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/array1.js'
npm ERR! You may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR!
npm ERR! System Darwin 10.8.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "socket.io"
npm ERR! cwd /Users/NAME
npm ERR! node -v v0.6.14
npm ERR! npm -v 1.1.12
npm ERR! path /Users/NAME/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/array1.js
npm ERR! code ENOENT
npm ERR! message ENOENT, open '/Users/NAME/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/array1.js'
npm ERR! errno {}
npm ERR! ws#0.4.11 preinstall: `make`
npm ERR! `sh "-c" "make"` failed with 127
npm ERR!
npm ERR! Failed at the ws#0.4.11 preinstall script.
npm ERR! This is most likely a problem with the ws package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! make
npm ERR! You can get their info via:
npm ERR! npm owner ls ws
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Darwin 10.8.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "socket.io"
npm ERR! cwd /Users/NAME
npm ERR! node -v v0.6.14
npm ERR! npm -v 1.1.12
npm ERR! code ELIFECYCLE
npm ERR! message ws#0.4.11 preinstall: `make`
npm ERR! message `sh "-c" "make"` failed with 127
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/NAME/npm-debug.log
npm not ok
PLS help!
Force the installation using
npm install socket.io -f
Looks like the tests needs node-waf, but not the library directly. I hope they fix these issues eventually.
Socket.io runs a make upon install and requires node-waf in order to run. Did you install node via a package manager like ports, or did you use the dmg install on the node website?
This thread speaks to the issue you're having:
https://github.com/LearnBoost/socket.io/issues/773
Seems like if you install an earlier version of socket.io there is no need to run the make script. I tried the following and managed to get it installed successfully on my Mac OSX 10.6.8:
npm install socket.io#0.7
There is further discussion on this google groups post.

Resources