运行 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
中。
关于如何解决这个问题有什么想法吗?
最佳答案
就我而言,问题与 karma 配置 plugins
部分中缺少 karma-ng-html2js-preprocessor
有关。在教程中,我看到您不需要在插件内添加 'ng-html2js'
,但对我来说,没有它就无法工作。
关于angularjs - Karma 抛出错误 : Can not load "ng-html2js", 它未注册,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19069183/