Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing failed karma@0.10.9 #940

Closed
vvakame opened this issue Mar 11, 2014 · 42 comments
Closed

Installing failed karma@0.10.9 #940

vvakame opened this issue Mar 11, 2014 · 42 comments

Comments

@vvakame
Copy link

vvakame commented Mar 11, 2014

Installing failed karma@0.10.9

$ npm install karma@0.10.9
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" "karma@0.10.9"
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

karma-coffee-preprocessor@0.2.0 wants karma@>=0.11.14
and karma's package.json"karma-coffee-preprocessor": "*"

@4kochi
Copy link
Contributor

4kochi commented Mar 11, 2014

👍

@adammartin1981
Copy link

Yup - having this too - can't seem to find a reason for it

@Antonio-Laguna
Copy link

This is really really really annoying. Can anyone find at least a workaround to this?

@stuplum
Copy link

stuplum commented Mar 11, 2014

I think what is happening is karma has a peer dependency for karma-coffee-preprocessor with a wildcard version, meaning it will download the latest, which is currently 0.2.0.

Version 0.2.0 of karma-coffee-preprocessor has a peer dependency "karma": ">=0.11.14"

Hence causing the issue. It's not a solution, but I think its the problem.

As far as I am aware the only solution is to upgrade to karma 0.11.14 or greater.

@Antonio-Laguna
Copy link

That's clearly it but IMHO, NPM should fetch a karma-coffee-preprocessor that fulfils this requirement.

@grapswiz
Copy link

👍

1 similar comment
@sinmetal
Copy link

👍

@stuplum
Copy link

stuplum commented Mar 11, 2014

@Belelros I'm not convinced npm itself is doing anything wrong here. I feel its more of an oversight of the authors of karma, surely having a wildcard as a version will eventually catch you out, as it has done here.

@just-boris
Copy link

I have upgraded to the new versions to work around this. My package.json

{
  "dependencies": {
      "grunt": "~0.4.2",
      "grunt-karma": "~0.7.2",
      "karma": "^0.11.14",
      "karma-chrome-launcher": "^0.1.2"
  }
}

don't forget to add karma-chrome-launcher because now it is not installed by default

@Antonio-Laguna
Copy link

@just-boris it seems you're using the unstable version?

@just-boris
Copy link

@Belelros what version is an unstable?

@Antonio-Laguna
Copy link

Karma 0.11 is unstable AFAIK. That's why grunt-karma has 0.6 and 0.7 versions, to keep the same pace with karma.

@just-boris
Copy link

Oh, you a right. But now this version looks more stable than 0.10.x, because it is just working 😃

@kevinrenskers
Copy link

Right now I can't find any way to install the combination of karma and gulp-karma.

npm install karma: installs fine
npm install gulp-karma:
npm ERR! peerinvalid Peer gulp-karma@0.0.2 wants karma@~0.10.9
npm ERR! peerinvalid Peer karma-chai@0.1.0 wants karma@>=0.10.9
npm ERR! peerinvalid Peer karma-mocha@0.1.1 wants karma@>=0.9

npm install karma@0.11.x: installs fine
npm install gulp-karma:
npm ERR! peerinvalid Peer gulp-karma@0.0.2 wants karma@~0.10.9
npm ERR! peerinvalid Peer karma-chai@0.1.0 wants karma@>=0.10.9
npm ERR! peerinvalid Peer karma-mocha@0.1.1 wants karma@>=0.9

npm install karma@0.10.x:
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

@koheiapril20
Copy link

I'm experiencing the same problem with the combination of karma and grunt-karma.

@romario333
Copy link

To keep using karma 0.10 you can do this:

npm install --save-dev karma-coffee-preprocessor@0.1.3

@voxpelli
Copy link

The fix suggested by @romario333 should solve it.

This is also a good use case for npm shrinkwrap – to avoid surprises like this in the middle of a deploy to eg. Heroku and such.

@vojtajina
Copy link
Contributor

@stuplum is right.

Can you install the latest Karma 0.12? npm install karma --save-dev?
It does not ship with any plugins.

Also, you can specify concrete deps in your package.json, so if you want to be using Karma 0.10.x, try this:

// package.json
{
  "devDependencies": {
    "karma": "0.10.9",
    "karma-coffee-preprocessor": "0.1.3"
  }
}

And then npm install. You might do rm -rf node_modules first.

Let me know if this works.

@vojtajina
Copy link
Contributor

I'm sorry to cause you troubles, NPM is really not great for this kind of stuff. I'm still trying to figure out what's the cleanest way to deal with all the dependencies.

Anyway, 0.12 does not ship with any plugins and rather karma init installs plugins you need so that should be much better.

Also, please depend on minor versions and you should be fine, that is ~0.10.0, ~0.12.0 or ~0.1.2, etc.

feltnerm added a commit to FineUploader/fine-uploader that referenced this issue Mar 11, 2014
The latest karma and grunt-karma node modules were causing problems.
Upgrading to karma 0.12.0 and grunt-karma 0.8.0 and locking those versions
in appears to solve the issue for now.

karma-runner/karma#940
@fivetanley
Copy link

The problem is not with NPM but with karma's declaration of * in their peerDependencies in the package.json file. The best approach might be to have karma declare compatible versions of its preprocessors in a 0.10.x release in the peerDependencies section. Right now you are breaking projects that do depend upon ~0.10.x. * in package.json just means install whatever, so you should declare compatible versions to fix this.

fivetanley pushed a commit to fivetanley/karma that referenced this issue Mar 11, 2014
@fivetanley
Copy link

https://github.com/fivetanley/karma/blob/fix-karma-coffee-preprocessor-dependency/package.json#L158 Would be a great, simple fix for the coffee-script issue. Ideally, we should do it in all of those fields to not break other people's projects.

@feltnerm
Copy link

Anyway, 0.12 does not ship with any plugins and rather karma init installs plugins you need so that should be much better.

Breaking change?

@vojtajina
Copy link
Contributor

@fivetanley, yes it would be much better to specify exact versions. That's how it used to be and so many people were complaining because they couldn't use the version they wanted. The "*" was basically a hack to allow people install whatever they want (which you can do, see my previous comment). Anyway, all these peer deps are gone, so I think this should not be issue again.

@feltnerm yep that is a breaking change. It is noted as a breaking change in the changelog, it is also noted in the migration guide. Before reaching 1.0, Karma uses even minor versions (0.8.x, 0.10.x, 0.12.x) for stable releases, you should depend on these (such as ~0.12.0 and there are no breaking changes within each of these release). Yep there are breaking changes when updating from 0.10 to 0.12, etc.

@fivetanley
Copy link

You wouldn't want to specify exact versions, just compatible versions. So you could use a range, like >= 1.0.0 < 2.0.0

@vojtajina
Copy link
Contributor

@fivetanley I don't think your fix fixes anything. The change you made is just devDep which is uses for testing. It won't effect people installing karma from NPM at all.

@fivetanley
Copy link

@vojtajina Oh whoops, if you put that in peerDependencies instead it will fix things. :)

@voxpelli
Copy link

@vojtajina What is the roadmap to a 1.0.0 release? Before such a release it is very hard to define that you want a compatible release of Karma or not – both for plugins and others.

And any chance for maintenance releases for 0.9 and 0.10 with a more strict peer dependency, as suggested by eg. @fivetanley? Or do users have to either upgrade to the new 0.12 version or opt to fix the issue by doing one or both of the mentioned solutions:

  1. Force a 0.1.3 version in the top project that depend on Karma by eg. doing npm install --save-dev karma-coffee-preprocessor@0.1.3 – as suggested by @romario333
  2. Do npm shrinkwrap on an existing working setup to lock the working karma-coffee-preprocessor version in place – as suggested by me

@vojtajina
Copy link
Contributor

There is no peerDep anymore.

I can probably push 0.10.10 with peerDeps set to a range to avoid the coffee-preprocessor problem

@fivetanley
Copy link

Yeah, sorry I didn't mention that. I meant a new version to fix for 0.10.x only.

@vojtajina
Copy link
Contributor

@fivetanley that's great idea, I'm doing that right now....

@fivetanley
Copy link

Excellent! Thank you! 😄

@voxpelli
Copy link

@vojtajina Friendly tip if you haven't published old versions before (stumbled upon it myself recently) – beware of npm/npm#2407 and don't just publish it as usual to npm – it will be interpreted as the latest version – instead publish it with a tag

vojtajina added a commit that referenced this issue Mar 11, 2014
We removed these default plugins in 0.12.

There are incompatible changes in coffee-preprocessor 0.2.0 (and might be other incompatible changes with 0.10) so I think it's better to freeze the deps.

Closes #940
@vojtajina
Copy link
Contributor

@voxpelli thanks for friendly tip, I did this in the past ;-)

@vojtajina
Copy link
Contributor

All right, I pushed 0.10.10 that should fix this. Thanks for all the help @voxpelli @fivetanley

@vojtajina
Copy link
Contributor

@voxpelli I think the last big thing for 1.0 is parallelization. I would also like to make the interfaces between karma/plugins more clear/strict (to avoid breaking changes, because right now plugins can do anything, which means they can also depend on any internal API). I'm not sure how to tackle yet...

@kevinrenskers
Copy link

Right now doing a "npm install karma" installs 0.10.10.

@vojtajina
Copy link
Contributor

Works for me, npm install karma installs 0.12 and npm install karma@~0.10.0 installs 0.10.10, both work fine for me.

@kevinrenskers
Copy link

Yep, now it works fine for me too, weird. After you pushed 0.10.10 the NPM page was showing 0.10.10 as well (https://www.npmjs.org/package/karma), now it shows 0.12.0 as expected.

vojtajina referenced this issue in karma-runner/karma-coffee-preprocessor Mar 11, 2014
@JJJollyjim
Copy link

Hi there,

This problem seems to have returned, somehow. I'm trying to install the AngularJS sample project for the official tutorial, but this error...

npm ERR! peerinvalid The package karma-requirejs does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer karma@0.10.10 wants karma-requirejs@~0.2.0

npm ERR! System Linux 3.13.6-1-ARCH
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/jamie/Code/ngTutorial/angular-phonecat
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!     /home/jamie/Code/ngTutorial/angular-phonecat/npm-debug.log
npm ERR! not ok code 0

...occurs (despite the karma version being 0.10.10). Any idea how I can fix this?

@vojtajina
Copy link
Contributor

I think you need to first update karma-requirejs, you probably have some
older version.

npm install --save-dev karma-require

On Tue, Mar 18, 2014 at 7:41 PM, Jamie notifications@github.com wrote:

Hi there,

This problem seems to have returned, somehow. I'm trying to install the
AngularJS sample project https://github.com/angular/angular-phonecatfor the official tutorial, but this error...

npm ERR! peerinvalid The package karma-requirejs does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer karma@0.10.10 wants karma-requirejs@~0.2.0

npm ERR! System Linux 3.13.6-1-ARCH
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/jamie/Code/ngTutorial/angular-phonecat
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! /home/jamie/Code/ngTutorial/angular-phonecat/npm-debug.log
npm ERR! not ok code 0

...occurs (despite the karma version being 0.10.10). Any idea how I can
fix this?

Reply to this email directly or view it on GitHubhttps://github.com//issues/940#issuecomment-38012402
.

@JJJollyjim
Copy link

Thanks for that :)

@RLovelett
Copy link

I am seeing this problem with karma-jasmine when trying to use karma-jasmine@0.2.2.

npm install karma@0.10.10 karma-jasmine@0.2.2 karma-safari-launcher karma-phantomjs-launcher karma-requirejs

Gives:

npm ERR! peerinvalid The package karma-jasmine does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer karma@0.10.10 wants karma-jasmine@~0.1.0

npm ERR! System Darwin 13.1.0
npm ERR! command "/usr/local/Cellar/node/0.10.26/bin/node" "/usr/local/bin/npm" "install" "karma@0.10.10" "karma-jasmine@0.2.2" "karma-safari-launcher" "karma-phantomjs-launcher" "karma-requirejs"
npm ERR! cwd /Users/ryan/Source/webview
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/ryan/Source/webview/npm-debug.log
npm ERR! not ok code 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests