Skip to content

Uncaught exception when including literally anything in Electron app #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rreed opened this issue Apr 5, 2019 · 2 comments
Open

Comments

@rreed
Copy link

rreed commented Apr 5, 2019

const ffi = require('ffi-napi');
let foo = ffi.Library('../native/foo.dll', {
    ...
};

image

This even happens with the absolute bare minimum possible invocation: let foo = ffi.Library(null, {});

@huoruji
Copy link

huoruji commented Apr 18, 2020

const ffi = require('ffi-napi');我在主进程引入的时候跟你报一样的错,请问解决了吗?

@vweevers
Copy link

This is a webpack issue. See TooTallNate/node-bindings#43 for a solution. Alternatively, keep ffi in the main electron process, without webpack, then expose your API to renderer processes via IPC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants