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

Serialport native module crashing nwjs #7218

Closed
dilushan opened this issue Nov 17, 2019 · 2 comments
Closed

Serialport native module crashing nwjs #7218

dilushan opened this issue Nov 17, 2019 · 2 comments
Assignees

Comments

@dilushan
Copy link

dilushan commented Nov 17, 2019

Im using serialport node module in nwjs (0.42.4 32 bit sdk) windows 10 system. I used nw-gyp to rebuild node modules accrording to this guide
http://docs.nwjs.io/en/latest/For%20Users/Advanced/Use%20Native%20Node%20Modules/#install-with-npm
But when running below code nwjs crashing like this

var serialport = nw.require('serialport');
const port = new serialport('COM1', function (err) {
if (err) {
return console.log('Error: ', err.message)
}
})

image

But i can require bindings.node from console fine

image

Please note that when I follow the same procedure on 64 bit nwjs sdk serialport module working as expected.

@dilushan
Copy link
Author

I found out serialport working fine on v0.37.0 of 32bit nwjs. So this is a problem with newer versions

@rogerwang rogerwang self-assigned this Nov 24, 2019
@rogerwang
Copy link
Member

I just found it shares the same root cause as nwjs/nw-gyp#130 (comment) . So merging with that issue and you can use the workaround there.

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