Exception could not locate binding file after updating electron version

半城伤御伤魂 提交于 2019-12-11 06:40:03

问题


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.

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

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.

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

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

First part of error

Second part of error


回答1:


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.



来源:https://stackoverflow.com/questions/46511014/exception-could-not-locate-binding-file-after-updating-electron-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!