我正在尝试使用猛mm .docx到HTML转换器将word文档(包含段落和表格)转换为HTML代码,但是出现以下错误
ERROR in ./node_modules/mammoth/lib/docx/docx-reader.js
Module not found: Error: Can't resolve 'path' in 'F:\vedha\angular\Projects\angular_testing\testing\node_modules\mammoth\lib\docx'
component.ts
mammoth.convertToHtml({path: "../../../assets/doc1.docx"})
.then(function(result){
var html = result.value; // The generated HTML
var messages = result.messages; // Any messages, such as warnings during conversion
})
.done();
尽管我更改了路径,但仍在其中查找了doc文件的node_modules