模块版本不匹配。预期为49,得到48 [英] Module version mismatch. Expected 49, got 48

查看:99
本文介绍了模块版本不匹配。预期为49,得到48的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Electron模块mdns,并且遇到此错误

I am using Electron module mdns and I am getting this error

A JavaScript error occurred in the main process
Uncaught Exception:
Error: Module version mismatch. Expected 49, got 48.
    at Error (native)
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:167:20)
    at Object.Module._extensions..node (module.js:568:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:167:20)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/ingsaurabh/dp/node_modules/mdns/lib/dns_sd.js:24:20)

已卸载节点模块并重新安装,但无法正常工作

Uninstalled node module and reinstalled, but not working

推荐答案

由于 mdns 包含一个本机节点模块,您必须对其进行重建以针对您的Electron版本,其中有执行此操作的几种方法。我建议使用电子重建方法。

Since mdns contains a native Node module you must rebuild it to target your version of Electron, there are a couple of ways to do this. I'd suggest using the electron-rebuild approach.

这篇关于模块版本不匹配。预期为49,得到48的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆