问题
I am trying to install karma-jasmine
on Windows 7 / Git Bash, according to these guidelines: http://karma-runner.github.io/0.13/intro/installation.html
However, the installation fails for jasmine-core
:
$ npm install karma-jasmine karma-chrome-launcher --save-dev
npm WARN install Couldn't install optional dependency: Unsupported
ngut@1.0.0 g:\SW Engineering\ngUT
├── UNMET PEER DEPENDENCY jasmine-core@*
├─┬ karma-chrome-launcher@0.2.2
│ ├─┬ fs-access@1.0.0
│ │ └── null-check@1.0.0
│ └─┬ which@1.2.0
│ └─┬ is-absolute@0.1.7
│ └── is-relative@0.1.3
└── karma-jasmine@0.3.6
npm WARN EPEERINVALID karma-jasmine@0.3.6 requires a peer of jasmine-core@* but
none was installed.
I tried the installation first with Cygwin, only to learn that npm
is not supported on Cygwin, but there the failing dependency was fsevent
.
The global installation of jasmine-core
succeeds, but I am trying to follow this tutorial and karma start karma.conf.js
fails for the same reason (missing jasmine-core
) with the global installation as well.
Finally, the exact same problem appears on OSX as well.
回答1:
Karma v.0.13.16 just did not support v.5.3.0 of Node. The supported Node versions were listed on Karma installation page.
来源:https://stackoverflow.com/questions/34379469/cannot-install-jasmine-core-on-windows-7-osx