Karma 抛出错误:无法加载“ng-html2js",未注册 [英] Karma throws error: Can not load "ng-html2js", it is not registered
本文介绍了Karma 抛出错误:无法加载“ng-html2js",未注册的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
运行 karma start
时出现错误:
$ karma start
INFO [karma]: Karma v0.10.2 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
WARN [preprocess]: Can not load "ng-html2js", it is not registered!
Perhaps you are missing some plugin?
...
但在我的包文件中,我有 "karma-ng-html2js-preprocessor": "*",
并且包含此预处理器代码的文件夹存在于 node_modules
中.
But in my package file I have "karma-ng-html2js-preprocessor": "*",
and the folder with code for this preprocessor exists in node_modules
.
对如何解决问题有任何想法吗?
Any ideas on how to solve the problem?
推荐答案
就我而言,问题与 karma config plugins<中缺少
karma-ng-html2js-preprocessor
相关/code> 部分.在教程中,我看到您不需要在插件中添加 'ng-html2js'
,但对我来说,没有它就行不通.
In my cases, the problem was connected to lack of karma-ng-html2js-preprocessor
inside karma config plugins
sections. In tutorials I saw that you don't need to add 'ng-html2js'
inside plugins, but for me it doesn't work without it.
这篇关于Karma 抛出错误:无法加载“ng-html2js",未注册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文