electron / forge

:electron: A complete tool for building and publishing Electron applications
https://electronforge.io
MIT License
6.41k stars 505 forks source link

Error when importing native node module in Electron-forge #2023

Closed noctera closed 3 years ago

noctera commented 3 years ago

Preflight Checklist

Issue Details

Expected Behavior

Im using electron forge with webpack template I want to import my native node module, I created with

cmake-js --runtime=electron --runtime-version=10.1.5

and imported it with

var vocascan = require('bindings')('vocascan.node')

Actual Behavior

When running with npm run start, in dev mode, everything works just fine. But when I package it I get this errors DeepinBildschirmfoto_plasmashell_20201105112710.png

To Reproduce

Additional Information