找不到插件 "karma-mocha-reporter"。 npm install 有效,但错误仍然存在。
Cannot find plugin "karma-mocha-reporter". npm install works, but error persist.
一旦我尝试添加
plugins: [
'karma-jasmine',
'karma-mocha-reporter'
],
给我的 karma.config.js
我收到此错误:
C:\git\angularjs\.bin>karma start karma.config.js
11 11 2015 15:21:10.617:WARN [plugin]: Cannot find plugin "karma-mocha-reporter".
Did you forget to install it ?
npm install karma-mocha-reporter --save-dev
11 11 2015 15:21:10.671:INFO [karma]: Karma v0.13.14 server started at http://localhost:9876/
11 11 2015 15:21:10.672:WARN [launcher]: Can not load "Chrome", it is not registered!
Perhaps you are missing some plugin?
显然我尝试了 运行
npm install karma-mocha-reporter --save-dev
也在全局安装它
npm install karma-mocha-reporter --save-dev -g
并且安装正常。但是当我启动业力时,我仍然不断收到错误消息。是安装错地方了还是怎么的?
我想你也想要 karma-chrome-launcher
尝试
npm install --save-dev karma-chrome-launcher
您需要在插件数组中添加 karma-chrome-launcher 插件:
plugins: [
'karma-jasmine',
'karma-mocha-reporter',
'karma-chrome-launcher'
],
我怎么回答,我认为你安装了全局的 karma-mocha-reporter 插件。
尝试使用 link 标志安装 karma-mocha-reporter:
npm install karma-mocha-reporter --save-dev --link
一旦我尝试添加
plugins: [
'karma-jasmine',
'karma-mocha-reporter'
],
给我的 karma.config.js
我收到此错误:
C:\git\angularjs\.bin>karma start karma.config.js
11 11 2015 15:21:10.617:WARN [plugin]: Cannot find plugin "karma-mocha-reporter".
Did you forget to install it ?
npm install karma-mocha-reporter --save-dev
11 11 2015 15:21:10.671:INFO [karma]: Karma v0.13.14 server started at http://localhost:9876/
11 11 2015 15:21:10.672:WARN [launcher]: Can not load "Chrome", it is not registered!
Perhaps you are missing some plugin?
显然我尝试了 运行
npm install karma-mocha-reporter --save-dev
也在全局安装它
npm install karma-mocha-reporter --save-dev -g
并且安装正常。但是当我启动业力时,我仍然不断收到错误消息。是安装错地方了还是怎么的?
我想你也想要 karma-chrome-launcher
尝试
npm install --save-dev karma-chrome-launcher
您需要在插件数组中添加 karma-chrome-launcher 插件:
plugins: [
'karma-jasmine',
'karma-mocha-reporter',
'karma-chrome-launcher'
],
我怎么回答
尝试使用 link 标志安装 karma-mocha-reporter:
npm install karma-mocha-reporter --save-dev --link