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

grunt-karma ^2.0.0 installs karma@1.0.0 and tests don't work #192

Closed
gugol2 opened this issue Jun 26, 2016 · 6 comments
Closed

grunt-karma ^2.0.0 installs karma@1.0.0 and tests don't work #192

gugol2 opened this issue Jun 26, 2016 · 6 comments

Comments

@gugol2
Copy link

gugol2 commented Jun 26, 2016

When installing grunt-karma npm install grunt-karma --save-dev it install karma^1.0.0 with it. And that breaks the tests:

Warning: .then() only accepts functions but was passed: [object Undefined], [object Undefined]...

More info here.

@dignifiedquire
Copy link
Member

Can you provide a repro project? My tests run fine with karma@1.0

@gugol2
Copy link
Author

gugol2 commented Jun 26, 2016

Create an angular project with yeoman (using grunt, not gulp) and try running the tests.

@dignifiedquire
Copy link
Member

Does not reproduce it for me: This project works fine for me: https://github.com/dignifiedquire/grunt-karma-192

@gugol2
Copy link
Author

gugol2 commented Jul 8, 2016

Sorry for my delay.

It's quite strange, I get it when running grunt on windows but not in linux.
I tested your repo in W7 and Ubuntu14.04 and it only fails in W7.

It also happens just the same with my repo.

@gugol2
Copy link
Author

gugol2 commented Jul 23, 2016

So in W7 I sorted out by installing the the version that grunt-karma needs according to the docs:

This current version uses karma`@0.13.x ...

npm install karma@0.13.22 --save-dev

Although it the tables it seems to depend of different versions of karma for devDependencies(1.x || ^0.13.0) and peerDependencies(^0.13.0 || >= 0.14.0-rc.0)

@Krinkle
Copy link
Collaborator

Krinkle commented Sep 12, 2018

With currently supported versions of Node.js and npm (Node 6+, npm 3+) peerDependencie are not automatically downloaded (unlike regular dependencies). Instead, it is up to the project to decide what and which version to install.

As such, any version of karma and any version of grunt-karma can be used together. The peerDependencies only prints a soft warning if they don't match what we recommend and support.

The karma 1.x support has been been added and released, so closing this report. See #267 for a similar issue with karma 3.x, which we're fixing next.

Thanks!

@Krinkle Krinkle closed this as completed Sep 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants