无法加载“即"邮件它没有注册 [英] Cannot load "ie" it is not registered
问题描述
OK, this question is similar to the one posed here: Can not load "IE", it is not registered! error message on Karma
除了我怀疑用户在区分32位和64位资源管理器时遇到问题.我的问题是在WinXP中运行的32位资源管理器.
Except I suspect that user has a problem with differentiating between 32bit and 64bit explorer. My issue is for 32 bit Explorer running in WinXP.
启动业力时,我收到消息无法加载IE,未注册.也许您缺少某些插件?"在此之前,我已经安装了ie启动器和Firefox. Firefox 可以工作.
When I launch karma I get the message "Cannot load IE it is not registered. Perhaps you are missing some plugin?" Prior to this, I had installed the ie launcher as well as the Firefox one. The Firefox one does work.
以下是我尝试进行启动的步骤:
Here are the steps I followed to try and get it to launch:
1) npm install karma-ie-launcher --save-dev
不行
2),然后我注意到package.json
,因为Karma没有ie的条目.所以我将它们添加到了
2) then I noticed package.json
for Karma did not have the entries for ie. So I added them to
devDependencies,以及很好的对等依赖
devDependencies and, for good measure, peer dependencies
不行
3),然后我运行karma start --log-level debug
来验证ie插件已被识别并加载.是的.
3) then I ran karma start --log-level debug
to verify the ie plugin was recognized and loaded. It was.
4)绝望地尝试使用以下修补程序覆盖ie-launcher的index.js
:
4) in desperation tried overwriting the index.js
for ie-launcher with the patch from here: https://github.com/christophercurrie/karma-ie-launcher/blob/64bit/index.js
不行(尽管我没想到真的会有所作为).
no go (though I didn't really expect it to make a difference).
作为参考,我的IE_BIN指向C:\Program Files\Internet Explorer\iexplore.exe
For reference, my IE_BIN is pointing to C:\Program Files\Internet Explorer\iexplore.exe
更新:通过手动-在karma.config文件中-为IE添加插件部分和条目(如下所示),我现在可以使karma尝试启动IE.它尝试3倍,并且每次打开浏览器窗口时,但业力报告无法启动IE",并且没有执行任何测试.
UPDATE: By manually -- in the karma.config file -- adding a plugin section and entry for IE (as suggested below) I can now get karma to attempt to launch IE. It tries 3x and each time a browser window is opened but karma reports "Cannnot launch IE" and none of the tests get executed.
奇怪的是,如果我单击debug
按钮,它似乎尝试在IE中加载测试(我可以看到测试装置中的HTML出现),但Karma不会报告任何内容.
Oddly if I click on the debug
button it appears to try and load the tests within IE (I can see HTML from my test fixture appear) but Karma does not report anything.
推荐答案
有时,即使插件已加载,您也必须在配置文件中为业力指定它们. 覆盖面我也遇到了同样的问题.
Sometimes, even if the plugin in loaded, you have to specify them it in the config file for karma. I had the same issue for the coverage one.
在配置文件的末尾,只需写下您正在使用的所有插件的列表即可:
At the end of your configuration file just write the list of ALL the plugins you are using:
...
plugins: [
'karma-mocha',
'karma-coverage',
'karma-chrome-launcher',
'karma-ie-launcher',
]
应该可以.
这篇关于无法加载“即"邮件它没有注册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!