karma-runner / grunt-karma

Grunt plugin for Karma.
MIT License
468 stars 116 forks source link

fail to install grunt-karma (maybe caused by karma 0.12.0 released) #95

Closed vvakame closed 10 years ago

vvakame commented 10 years ago

fail to install grunt-karma (maybe caused by karma 0.12.0 released)

$ npm install grunt-karma
(omit)
npm ERR! peerinvalid The package karma does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer grunt-karma@0.6.2 wants karma@~0.10.0
npm ERR! peerinvalid Peer karma-chrome-launcher@0.1.2 wants karma@>=0.9.3
npm ERR! peerinvalid Peer karma-coffee-preprocessor@0.2.0 wants karma@>=0.11.14
npm ERR! peerinvalid Peer karma-firefox-launcher@0.1.3 wants karma@>=0.9
npm ERR! peerinvalid Peer karma-html2js-preprocessor@0.1.0 wants karma@>=0.9
npm ERR! peerinvalid Peer karma-jasmine@0.1.5 wants karma@>=0.9
npm ERR! peerinvalid Peer karma-phantomjs-launcher@0.1.2 wants karma@>=0.9
npm ERR! peerinvalid Peer karma-requirejs@0.2.1 wants karma@>=0.9
npm ERR! peerinvalid Peer karma-script-launcher@0.1.0 wants karma@>=0.9

npm ERR! System Darwin 13.1.0
npm ERR! command "/Users/vvakame/.nodebrew/current/bin/node" "/Users/vvakame/.nodebrew/current/bin/npm" "install" "grunt-karma"
npm ERR! cwd /Users/vvakame/Downloads/karma
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code EPEERINVALID
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/vvakame/Downloads/karma/npm-debug.log
npm ERR! not ok code 0
vvakame commented 10 years ago

umm... sorry, this issue is karma's issue.

this issue reproduction with npm install karma@0.10.9 command.

https://github.com/karma-runner/karma/blob/d5eddf1e69957ec07f88fa9893bf78512f47dc73/package.json#L172

I am looking forward to the release of new grunt-karma :+1:

vvakame commented 10 years ago

I'm reporting to the karma repository https://github.com/karma-runner/karma/issues/940

just-boris commented 10 years ago

That issue can't be fixed in karma, because of it affects only previous version, which it can be rewriten. So that, it should be fixed here by changing of the dependency

Antonio-Laguna commented 10 years ago

@just-boris Karma is having a bad dependency referenced right? grunt-karma@0.6.2 is providing the correct karma version and it's karma itself whom is requiring karma-coffe-preprocessor

vvakame commented 10 years ago

We can be successfully installed karma@0.12.0. if give me released in support of this, it is possible to cope with increasing the version grunt-karma.

jlowcs commented 10 years ago

I read on the following link that you should avoid using the tilde versionning for peerDependencies: http://yeoman.io/blog/cleanup.html

So I resolved the issue on my end by forking grunt-karma and changing the karma peerDependency to ">=0.10"

But I now have the following error:

Running "karma:continuous" (karma) task
Warning: No provider for "framework:jasmine"! (Resolving: framework:jasmine) Use --force to continue.
dignifiedquire commented 10 years ago

@jlowcs you installed karma 0.12 which no longer bundles any frameworks you'll have to install them yourself, e.g. npm install --save-dev karma-jasmine.

jlowcs commented 10 years ago

Indeed @Dignifiedquire, thank you.

I now get another error, though:

Running "karma:continuous" (karma) task
INFO [karma]: Karma v0.12.0 server started at http://localhost:9090/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.7 (Windows 7)]: Connected on socket l_MJrn6wV9lZkZZ-vp_o with id 19971276
PhantomJS 1.9.7 (Windows 7): Executed 0 of 1 SUCCESS (0 secs / 0 secs)
Fatal error: Cannot call method 'push' of undefined

EDIT: forced the use of karma 0.10.9 and karma-coffee-preprocessor 0.1.3 as a temporary fix.

EDIT2: because of that fix, I don't need to use my fork anymore

dignifiedquire commented 10 years ago

Not sure but that error looks like it comes from somewhere in your tests. Maybe some files weren't loaded?

jlowcs commented 10 years ago

I don't think so, especially since it works with an older version of Karma.

mrumpf commented 10 years ago

I have removed the test files from the test folder and I still get the error:

INFO [karma]: Karma v0.12.24 server started at http://localhost:8888/
INFO [launcher]: Starting browser PhantomJS
WARN [watcher]: Pattern "C:/path/yo/test/mock/**/*.js" does not match any file.
WARN [watcher]: Pattern "C:/path/yo/test/spec/**/*.js" does not match any file.
INFO [PhantomJS 1.9.7 (Windows 7)]: Connected on socket apl_ZNxIsWp_PkoMzDLW with id 96828921
PhantomJS 1.9.7 (Windows 7): Executed 0 of 0 SUCCESS (0 secs / 0 secs)
Fatal error: Cannot call method 'push' of undefined

Execution Time (2014-10-24 20:14:50 UTC)

With Firefox as browser I get the same error:

INFO [karma]: Karma v0.12.24 server started at http://localhost:8888/
INFO [launcher]: Starting browser Firefox
WARN [watcher]: Pattern "C:/work/workspaces/sbs-setools-gitblit/sbs-admin/sbs-admin-ui/yo/test/mock/**/*.js" does not match any file.
WARN [watcher]: Pattern "C:/work/workspaces/sbs-setools-gitblit/sbs-admin/sbs-admin-ui/yo/test/spec/**/*.js" does not match any file.
INFO [Firefox 31.0.0 (Windows 7)]: Connected on socket GFFeMdX1RXZaXAZ22nwt with id 84338179
Firefox 31.0.0 (Windows 7): Executed 0 of 0 SUCCESS (0 secs / 0 secs)
Fatal error: Cannot call method 'push' of undefined

Execution Time (2014-10-24 20:30:27 UTC)
mrumpf commented 10 years ago

OK, the issue seems to be an old version of the karma-junit-reporter. I had version 0.1.0 in my package.json. After updating to 0.2.2 the error went away: https://github.com/karma-runner/karma-junit-reporter/issues/11