Protractor error "jasmine-spec-reporter 2.x is not compatible with jasmine < 2.x" even though Jasmine 2.0 installed

828 Views Asked by At

I got this error in Protractor after adding jasmine-spec-reporter even though my jasmine-core module is release 2.0

"*******************************************************************
* Oops!                                                           *
* jasmine-spec-reporter 2.x is not compatible with jasmine < 2.x. *
*                                                                 *
* Please consider using jasmine-spec-reporter < 2.0.0.            *
*                                                                 *
*      npm install jasmine-spec-reporter@"<2.0.0" --save-dev      *
*******************************************************************"
1

There are 1 best solutions below

0
Justin On

The problem was the 'jasmine' keyword specified in protractor.conf.js

,framework: 'jasmine'

The solution was to change it to 'jasmine2'

,framework: 'jasmine2'

Here is the link to the protractor documentation where they talk about this.

https://github.com/angular/protractor/blob/master/docs/jasmine-upgrade.md#in-your-conf-file

Specify that you want to use jasmine2.x:

exports.config = {
  // Specify you want to use jasmine 2.x as you would with mocha and cucumber.
  framework: 'jasmine2'
};