更新电子版本后无法找到绑定文件的异常 [英] Exception could not locate binding file after updating electron version

查看:55
本文介绍了更新电子版本后无法找到绑定文件的异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用电子版1.2.5更新我的项目 到此时的最新电子是1.7.7(至少是我下载时的电子).我的节点版本6.9.1.

I'm working on updating my project from using electron version 1.2.5 to the newest electron at this time which is 1.7.7 (atleast it was when I downloaded it). My node version 6.9.1.

当我使用新的电子版本启动项目时遇到了问题, 该错误通常是与无法找到绑定文件.它主要与异步模块有关.

I've encountered a problem when I start my project with this new electron version, the error in general is about "could not locate the binding files. and it mostly regards the async module.

我在我的项目(版本5.0.3)中使用的node-etcd模块也有一部分例外情况

There is also some part of the exception regarding node-etcd module which I use in my project (version 5.0.3)

我在线上找到了有关这种异常类型的一些信息,但是大多数人都说了一些关于使用一些我不了解的npm命令来重建某些节点模块的信息.我尝试将异步模块再次安装在新文件夹中,并在当前用于我的项目的node modules文件夹中将其替换(用deps替换),但是我仍然遇到相同的错误.

I found some information about this type of exception online but most of them says stuffs about rebuilding some node module using some npm commands which I didn't quiet understand. I tried to install async module again in a new folder and replace it (with its deps) in the node modules folder im currently using for my project, but I still got the same error.

我正在离线环境中工作,在该环境中,我不能将我的项目带出"到具有互联网访问权限的计算机上,我只能将网络上的东西带到我的项目中(例如安装在某个文件夹中,然后将其复制到我的项目中),因此任何需要Web连接的npm或其他命令都无法直接在我的工作计算机上使用. (我只能在其他计算机上使用它们,然后将结果复制到闪存驱动器中,然后将其移至

I'm working in an offline enviorment where I can't take my project "out" to a computer with internet access, I can only bring things from the web to my project (like installing in some folder and then copying that into my project) so any npm or other commands that require web connection are not available to me directly on my work computer. (I can only use them in a different computer and copy the results to a flash drive and bring them to th

以下是该错误的2张图片(对质量感到抱歉,这是我能得到的最好的结果):

Here's 2 pictures of the error (sorry about the quality, its the best I could get):

错误的第一部分

第二部分错误

推荐答案

解决我这个问题的解决方案是进入node_modules-> deasync-> index.js 在第31行之前,我添加了换行符(在绑定行旁边) 并写道:

The solution that fixed the problem in my case was going into node_modules - > deasync - > index.js Before line 31 I added a newline (next to the binding line) and wrote:

modPath = __dirname;

此解决方案很骇人,它是由某位员工不久前准确找到的,所以我不确定为什么它可以工作,这可能是异步处理中的问题,但它解决了该问题.

This solution is hacky, it was accually ly found by an associate a while back, so I am not sure why it works, it might be an issue in deasync, but it fixed the problem.

这篇关于更新电子版本后无法找到绑定文件的异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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