Skip to content
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

Convert to executable #49

Open
Winexcel opened this issue Nov 21, 2020 · 1 comment
Open

Convert to executable #49

Winexcel opened this issue Nov 21, 2020 · 1 comment

Comments

@Winexcel
Copy link

When I am trying to package my app with pkg, i am getting this error:

Error: No native build was found for platform=win32 arch=x64 runtime=node abi=72 uv=1 libc=glibc node=12.18.1
    loaded from: C:\snapshot\callWinapi\node_modules\ffi-napi\node_modules\ref-napi

    at Function.path (C:\snapshot\callWinapi\node_modules\node-gyp-build\index.js:59:9)
    at load (C:\snapshot\callWinapi\node_modules\node-gyp-build\index.js:21:30)
    at Object.<anonymous> (C:\snapshot\callWinapi\node_modules\ffi-napi\node_modules\ref-napi\lib\ref.js:8:53)
    at Module._compile (pkg/prelude/bootstrap.js:1320:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1156:10)
    at Module.load (internal/modules/cjs/loader.js:984:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Module.require (internal/modules/cjs/loader.js:1024:19)
    at Module.require (pkg/prelude/bootstrap.js:1225:31)
    at require (internal/modules/cjs/helpers.js:72:18)

Is is possible to package my app to .ece executable for windows using pkg or somthing else with includes ref-napi and ffi-napi?

@addaleax
Copy link
Contributor

If you do want to use native addons with pkg, that should be possible, but you need to include the (already-built) native addons themselves in that case, separately from the binary. I don’t know where exactly they would need to be put, though.

I’ve built boxednode as an alternative to pkg that supports actually bundling native addons into the executable, but it compiles Node.js from source, which takes a long time, so it might also not be a right choice here. I also haven’t tried to use it with ffi-napi/ref-napi/etc..

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

2 participants