Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

[email protected] requires a peer of jasmine@>=3 but none is installed.

After upgrading jasmine-core to version 3.1.0, I also wanted to upgrade karma-jasmine-html-reporter to the latest version 1.1.0

npm i --no-optional

results in

npm WARN [email protected] requires a peer of jasmine@>=3 but none is installed. You must install peer dependencies yourself.

My package.json with devDepenencies

"devDependencies": {
    "@angular/cli": "^6.0.8",
    "@angular/compiler-cli": "^6.0.4",
    "@angular/language-service": "^6.0.4",
    "@types/jasmine": "^2.8.8",
    "@types/node": "10.1.2",
    "jasmine-core": "~3.1.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~2.0.2",
    "karma-chrome-launcher": "~2.2.0",
    "karma-cli": "~1.0.1",
    "karma-ie-launcher": "^1.0.0",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^1.1.0",
    "protractor": "~5.3.2",
    "tslint": "~5.10.0",
    "typescript": "2.7.2",
    "@angular-devkit/build-angular": "~0.6.8"
}

Am I wrong assuming jasmine-core == @jasmine? Is there something I am missing here?

like image 749
mrkernelpanic Avatar asked Jun 12 '18 12:06

mrkernelpanic


1 Answers

This warning says that your package karma-jasmine-html-reporter has peer dependency to jasmine version >=3. Basically if you install latest version of jasmine that warning will be removed. Currently latest version of jasmine is 3.1.0 and if you install that version your issue will disappear.

You can fix this warning by running npm install --save-dev jasmine.

jasmine and jasmine-core are not same packages. Please see comparison between those two packages here.

like image 78
kat1330 Avatar answered Nov 18 '22 10:11

kat1330