Closed mikey0000 closed 1 month ago
Same issue with electron@31
Interestingly if I rebuild it locally it works fine, it also doesn't link to as much (checked using ldd)
Thanks for reporting.
I can reproduce it.
But in my case it is not even packaging the .node
or node-datachannel
module.
Am I missing something?
Or Could you create a repo for testing with basics?
examples/electron-demo as a template we say.
Yeah I'll try get something up over the next day or so. Have to use something like weppack and node loader
Thank you for the commit @leblowl
A new binary is created here. https://github.com/murat-dogan/node-datachannel/releases/tag/v0.12.0-dev
Could you please try and confirm that the problem has been solved?
For packing the electron-app with the native module, I have used webpack externals + copy plugin. Like;
plugins: [
new CopyPlugin({
patterns: [{ from: 'node_modules/node-datachannel', to: 'node_modules/node-datachannel' }],
}),
],
Any better ideas?
I can confirm the v0.12.0-dev is working on electron, linux and mac
Thank you for the commit @leblowl
A new binary is created here. https://github.com/murat-dogan/node-datachannel/releases/tag/v0.12.0-dev
Could you please try and confirm that the problem has been solved?
For packing the electron-app with the native module, I have used webpack externals + copy plugin. Like;
plugins: [ new CopyPlugin({ patterns: [{ from: 'node_modules/node-datachannel', to: 'node_modules/node-datachannel' }], }), ],
Any better ideas?
This works well and works well with ASAR
{
test: /\.node$/,
loader: 'node-loader'
}
The only other brute force thing I'm having to do for electron due to webpack being dumb is
sed -i "s|const nodeDataChannel = require('../build/Release/node_datachannel.node');|import nodeDataChannel from '../build/Release/node_datachannel.node';|g" node_modules/node-datachannel/lib/node-datachannel.js
Then it bundles it all correctly
Please check this commit for my config.
https://github.com/murat-dogan/node-datachannel/commit/c1916006da429fe5950db478ac14b06783397b79
Please check this commit for my config.
I don't think that would work for my setup due to asar and just in general the way you're supposed to bundle into electron, anyway, when could I expect to see an official release with prebuilts? Sorry don't mean to sound demanding or impatient just want to set some expectations, so I know when to come check again and so on.
Thanks again for this fix and your time!
I have just released v0.12.0!
Error: /home/michael/git/gameglass/GameGlass/hub/node_modules/node-datachannel/build/Release/node_datachannel.node: undefined symbol: _ZTVN10cxxabiv117class_type_infoE