karma-opera-launcher没有提供这样的文件或指令./config/prefs.ini错误

时间:2015-07-12 02:57:28

标签: angularjs karma-runner opera karma-jasmine

我运行karma start test/karma.conf.js后发现此错误:

WARN [launcher]: Can not load "Opera", it is not registered!
  Perhaps you are missing some plugin?

似乎是因为这个错误:

WARN [plugin]: Error during loading "/usr/local/lib/node_modules/karma-opera-launcher" plugin:
  ENOENT, no such file or directory './config/prefs.ini'

完整输出:

~/code/simulated-selves $ karma start test/karma.conf.js
WARN [plugin]: Error during loading "/usr/local/lib/node_modules/karma-opera-launcher" plugin:
  ENOENT, no such file or directory './config/prefs.ini'
WARN [preprocess]: Can not load "ng-html2js", it is not registered!
  Perhaps you are missing some plugin?
INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [launcher]: Starting browser Firefox
INFO [launcher]: Starting browser Safari
WARN [launcher]: Can not load "Opera", it is not registered!
  Perhaps you are missing some plugin?
INFO [Safari 8.0.7 (Mac OS X 10.10.4)]: Connected on socket 7E_R6dTRtbdOIjPkKqiF with id 7465598
INFO [Chrome 43.0.2357 (Mac OS X 10.10.4)]: Connected on socket AxabWkNzGr4EcGn9KqiG with id 52528925
INFO [Firefox 39.0.0 (Mac OS X 10.10.0)]: Connected on socket jGDy5qBGHsLPo8h6KqiH with id 72018902
Safari 8.0.7 (Mac OS X 10.10.4): Executed 1 of 1 SUCCESS (0.017 secs / 0.014 secs)
Firefox 39.0.0 (Mac OS X 10.10.0): Executed 1 of 1 SUCCESS (0.029 secs / 0.026 secs)
Chrome 43.0.2357 (Mac OS X 10.10.4): Executed 1 of 1 SUCCESS (0.045 secs / 0.042 secs)
TOTAL: 3 SUCCESS

为什么会发生这种情况,我该怎么办呢?

我已成功投放npm install karma-opera-launcher --save-dev。我在我的电脑上安装了Opera,它可以工作。

编辑 - 更多详情:

  • 我使用的是Mac OSX 10.10.4。
  • 当我开始使用Opera karma start test/karma.conf.js之前,我遇到同样的问题。
  • 我尝试运行npm updatenpm update -g以及更新节点,但这些都没有效果。

1 个答案:

答案 0 :(得分:0)