我运行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,它可以工作。
编辑 - 更多详情:
karma start test/karma.conf.js
之前,我遇到同样的问题。npm update
和npm update -g
以及更新节点,但这些都没有效果。