简体   繁体   English

找不到模块'../build/Release/node_expat.node'

[英]Cannot find module '../build/Release/node_expat.node'

I am trying to read file xls file in NODE JS my sample code is as below 我正在尝试在NODE JS中读取文件xls文件,我的示例代码如下

var fs = require('fs');
var htmlparser = require("htmlparser");
var office = require('office');

exports.onlyText = function(test) {
test.expect(3);
var handler = new htmlparser.DefaultHandler(function (error, dom) {
    test.ok(!error, error); 
var text =  htmlparser.DomUtils.getElementsByTagName("P",     dom)[0].children[0].raw;
    test.strictEqual(text, '213', 'text data');
    test.done();
});
office.parse(__dirname + '/test.xls', function(err, data) {
    test.ok(!err, err);
    var parser = new htmlparser.Parser(handler);
    parser.parseComplete(data);
});
};

I don't know where i am wrong 我不知道我哪里错了

That error is originating from one of your node modules (probably node-expat ). 该错误源自您的节点模块之一(可能是node-expat )。 Make sure npm was able to properly install all the modules. 确保npm能够正确安装所有模块。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:找不到模块“ ./build/Release/analytics.node” - Error: Cannot find module './build/Release/analytics.node' 找不到模块'/node_modules/java/build/Release/nodejavabridge_bindings.node' - Cannot find module '/node_modules/java/build/Release/nodejavabridge_bindings.node' gulp服务:module.js 471,错误:找不到模块'./build/release/encode.node' - gulp serve : module.js 471 , Error : cannot find module './build/release/encode.node' Rocket.Chat构建失败,错误为“找不到模块'../build/Release/sharp.node'” - Rocket.Chat build failing with error “Cannot find module '../build/Release/sharp.node' ” «Canvas» 与 NodeJS 的使用:«无法找到模块 '../build/Release/canvas.node'» - Utilisation of «Canvas» with NodeJS : «Cannot find module '../build/Release/canvas.node'» 节点 JS 错误:找不到模块“./build/Release/mysql_bindings” - Node JS Error: Cannot find module './build/Release/mysql_bindings' Pop-OS/Ubuntu 更新后找不到模块“../build/Release/zmq.node” - Cannot find module '../build/Release/zmq.node' after Pop-OS/Ubuntu update strapi 错误:安装“sharp”模块时出错找不到模块'../build/Release/sharp-linux-x64.node' - strapi error: Something went wrong installing the "sharp" module Cannot find module '../build/Release/sharp-linux-x64.node' 找不到模块“节点” - Cannot find module 'node' 在OpenShift上找不到模块'../build/Debug/iconv.node' - Cannot find module '../build/Debug/iconv.node' on OpenShift
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM