如何解决从 mht 文件中提取文件时出现 Mhtml 库错误
我需要提取图像并生成一个 html 文件。 我已经安装了站点中提到的 mhtml 库
package.json file
"dependencies": {
"mhtml": "^0.1.2"
}
var mhtml = require('mhtml');
mhtml.extract('C:\\Projects\\DEMO\\mhtmlDemo/Template.mht','C:\\Projects\\DEMO\\mhtmlDemo',function (err) {
console.log('done.');
});
我遇到了附加的错误。
这里的错误源文件是mhtml库的一部分,cheerio-select在安装mhtml库时作为node-modules的一部分出现。
var _ = require('underscore'),select = require('cheerio-select'),utils = require('../utils'),isTag = utils.isTag;
var find = exports.find = function(selector) {
// Todo: Remove the call to _.uniq when the underlying bug in CSSselect has
// been resolved:
// https://github.com/fb55/CSSselect/issues/12
return this.make(_.uniq(select(selector,[].slice.call(this.children()))));
};
有没有人遇到过上述问题并且可以建议如何解决这个问题。
我尝试清除 node_modules 并重新安装,但是没有用。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。