electron/rebuild

Using node native Module parse failed: Unexpected character

fanchenio opened this issue · 1 comments

image

No problem in build stage

use in main.js

var addon = require('/build/Release/hello.node');
console.log(addon.hello());

Module parse failed: Unexpected character '�' (1:2)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

how did you solve this? I'm running into the exact issue