npm ref找不到绑定文件错误

我在使用电子的nodejs项目中使用了包ref。 但问题是当我在我的JS代码中使用ref时,它会抛出一个错误,它找不到绑定文件。 这是错误

错误:找不到绑定文件。 尝试:

→C:… \ EMVModule.asar \ node_modules \ ref \ build \ binding.node→C:… \ EMVModule.asar \ node_modules \ ref \ build \ Debug \ binding.node→C:… \ EMVModule .asar \ node_modules \ ref \ build \ Release \ binding.node→C:… \ EMVModule.asar \ node_modules \ ref \ out \ Debug \ binding.node→C:… \ EMVModule.asar \ node_modules \ ref \ Debug \ binding.node→C:… \ EMVModule.asar \ node_modules \ ref \ out \ Release \ binding.node→C:… \ EMVModule.asar \ node_modules \ ref \ Release \ binding.node→C :… \ EMVModule.asar \ node_modules \ ref \ build \ default \ binding.node→C:… \ EMVModule.asar \ node_modules \ ref \ compiled \ 6.5.0 \ win32 \ x64 \ binding.node绑定(C:… \ EMVModule.asar \ node_modules \ bindings \ bindings.js:88:9)。 在Module._compile(module.js:556:32)上,在Object.Module._extensions..js(module())模块上创build一个模块(C:… \ EMVModule.asar \ node_modules \ ref \ lib \ ref.js: (module.js:424:3)在Module.require(module.js:424:3)上的模块.load(module.js:473:32) (module.js:483:17)在要求(内部/ module.js:20:19)在对象。 >(C:… \ EMVModule.asar \ node_modules \ FFI \ lib中\ ffi.js:6:11)

我尝试使用电子重build,我试图使用node-gyp来重build,但没有用。 有什么办法可以解决这个问题吗?

谢谢

经过大量的反复试验,最后这个命令做了魔术

node-gyp rebuild --target=1.4.0 --arch=x64 --dist-url="https://atom.io/download/atom-shell" --msvs_version=2015